Yared Woldekiros Western Washington university WEB ENABLE HOME AUTOMATION
System Overview MCU: MCF52259 ColdFire V2 Microcontroller Bus Frequency: 48 MHz Internal Bus Memory Requirements: (Maximums) –ROM: ~311k Flash –RAM: ~440byts SRAM Available Memory: –ROM: 512k Flash –RAM: 64k SRAM
Kernel Selection MQX RTOS –Created for the ColdFire MCU. –The Real-Time multitasking. –RTCS (The Real-Time TCP/IP Communication Suite) TCP/IP Stack for Web Communication Ethernet driver
Task Set-up Priority Tasks Startup Task TCPIP Task HTTP Task IO Task
Startup Task –Initializes the System for Operation. –Initialize on chip resources. –Initialize network driver.
TCPIP Task –Communicate with the HTTP server. –Initialize IP address. –Initialize DHCP (depend on IP status)
HTTP Task –Process HTTP with HTTP protocol. – Communicate with Html files. –Handel request-response standard clint-server communications.
IO Task –Read and write to IO ports
Modules
WEHA Module –Initialize tasks.
HTML Module –It will have have HTML data file Hex or Binary Example: WEHA.html static const char WEHA_html[] = { 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x3e, 0x0d, 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0d, 0x0a, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0d, 0x0a, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x4d, 0x51, 0x58, 0x20, 0x57, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, ………...}
HTML Module continued… –HTML code will includes forms and java script. Html Form: for user input (button, check box) with post action. Example: Auto On …………
HTML Module continued… –java script to set the value of input and to keep update the current state Example: function loop() { if (!data_received) makeRequest(“WEHAdata.cgi"); setTimeout("loop()", 1000); } ………
Network Dataflow
Questions ?