1 / 15

WEHA

Western Washington university. Yared Woldekiros. Web Enable Home Automation. WEHA. System Overview. MCU: MCF52259 ColdFire V2 Microcontroller Bus Frequency: 48 MHz Internal Bus Memory Requirements: (Maximums) ROM: ~311k Flash RAM: ~440byts SRAM Available Memory:

avian
Download Presentation

WEHA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Western Washington university YaredWoldekiros Web Enable Home Automation WEHA

  2. 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

  3. 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

  4. Task Set-up Priority 9 10 11 12 Tasks Startup Task TCPIP Task HTTP Task IO Task

  5. Startup Task • Initializes the System for Operation. • Initialize on chip resources. • Initialize network driver.

  6. TCPIP Task • Communicate with the HTTP server. • Initialize IP address. • Initialize DHCP (depend on IP status)

  7. HTTP Task • Process HTTP with HTTP protocol. • Communicate with Html files. • Handel request-response standard clint-server communications.

  8. IO Task • Read and write to IO ports

  9. Modules

  10. WEHA Module • Initialize tasks.

  11. 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, ………...}

  12. HTML Module continued… • HTML code will includes forms and java script. • Html Form: for user input (button, check box) with post action. Example: • <form name=“WEHA" action="http:WEHAoutput.cgi" method="POST"> • <<input type="radio" name=“Light" value="auto" checked>Auto<BR> • <input type="radio" name="fan" value="off">On<BR> • ………… • <INPUT type="submit" value="Set"> • </form>

  13. HTML Module continued… • java script to set the value of input and to keep update the current state Example: • --------------------------------------------------------------------------------------------------------------------------- • <script type="text/javascript"> • function loop() { • if (!data_received) • makeRequest(“WEHAdata.cgi"); • setTimeout("loop()", 1000); • } • ……….. • </script> • -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

  14. Network Dataflow

  15. Questions ?

More Related