Remote Control Thermostat System Software Presentation
description
Transcript of Remote Control Thermostat System Software Presentation
![Page 1: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/1.jpg)
By Jesse W. Spalding
![Page 2: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/2.jpg)
Microcontroller Choice
Motorola 9S12DP256B
◦ Set to 24 MHz for the Bus Frequency
◦ Memory 256K Bytes of ROM 12K Bytes of RAM 4K Bytes of EEPROM
◦ MicroC/OS Kernel Timeslice Period of 1ms Semaphores to communicate between tasks
![Page 3: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/3.jpg)
MicroC/OS-II Real Time Preemptive Multitasking Kernel
By Jean J. Labrosse
Portable and Reusable Design
![Page 4: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/4.jpg)
4. Start Task5. Setup Task6. Time and Temp Task7. DAA Task8. Key Task
![Page 5: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/5.jpg)
Description◦ Initializes System◦ Creates Other Tasks◦ Priority: 4◦ Period of Task is once at start up◦ Estimated Execution Time is approximately
150ms
![Page 6: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/6.jpg)
Description◦ The task controls and deciphers the different modules. It
does the intertask communication between them all. It interprets user’s inputs both home user and phone user. It controls the DTMF input and the phone line interface over the DAA. Will also control the relays.
Priority: 5 Execution Time: approximately 3.75ms Period: 10ms CPU Load: approximately 0.375
![Page 7: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/7.jpg)
Description◦ It gets information from the RTC (which includes
temperature) and also receives alarm which are set up
Priority: 6 Execution Time: 40us Period: Every Second CPU Load: .00004
![Page 8: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/8.jpg)
Description: This task samples the RING pin (pin 8) on the DAA for a valid ring. If it does it sets a flag.
Priority: 7 Execution Time: 50us Period: 20ms CPU Load: .0025
◦ Code designed by: Leo Wan
![Page 9: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/9.jpg)
Description◦ Scans for a valid key input on Port H. Updates the
keypad buffer if a key is pressed and verified Priority: 8 Execution Time: 50us Period: 10ms CPU Load: 0.005
◦ Code designed by: Todd Morton & Thomas Chia
![Page 10: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/10.jpg)
Max CPU Load: 0.375+0.0004+0.0025+0.005 = 0.3829
Average CPU Load: Approximately 0.3
![Page 11: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/11.jpg)
Modules Tasks Public Functions and Data
Main.c Start Task Control Task
LCD.c written by Todd Morton
LcdInit()LcdClrDisp()LcdMoveCursor()LcdDispStrg()LcdDispChar()LcdDispTime()LcdCursor()
Key.c written by Todd Morton and Thomas Chia
KeyTask KeyInit()KeyPend()
EEProm.c written by Todd Morton
EEPROMInit()EESectModify()
VoiceCtrl.c written by Justin Klumpp
VoiceInit()PlayMSG()
DAA.c written by Leo Wan
DAA Task DAAInit()DAAOffHook()DAAOnHook()
![Page 12: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/12.jpg)
Modules Tasks Public Functions and Data
RTCDriver.c written by Todd Morton
RTCInit()RTCXfr()
VoiceDriver.c written by Jon Peterson
VoiceInit()VoiceXfr()
TimeTemp.c written by Todd Morton
RTC Task Relay()
VoiceCtrl.c written by Justin Klumpp
VoiceStart()PlayMSG()
DTMF.c written by Leo Wan
DTMFInit()DTMFWrite()DTMFRead()
ThermUI.c parts written by Leo Wan
TimeSet() DofWSet() TempSet() SetHys()Alarm1Set() Alarm2Set() PasswordSet() PhoneSet() PhoneTest() UIMain() UIMenu()
![Page 13: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/13.jpg)
KeyTask()
KeyInput.Buffer
Public Functions
KeyInit()
KeyPend()
Keypad Driver
KeyInput.Flag
KeyScan()
Set
Up
Down
10ms
![Page 14: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/14.jpg)
Lcd()
ThermUI.c Public Function(s) LCD I/O
TimeSet()
LcdInit()
LcdDispChar()
LcdDispStrg()
LcdCursor()
LcdMoveCursor()
DofWSet()
TempSet()
SetHys()
Alarm1Set()
Alarm2Set()
PasswordSet()
PhoneSet()
PhoneTest()
UIMenu()
UIMain()
LCD Driver
LcdClrDisp()
LcdDispTime()
![Page 15: Remote Control Thermostat System Software Presentation](https://reader036.fdocuments.in/reader036/viewer/2022062809/56815820550346895dc586b2/html5/thumbnails/15.jpg)
Control Task Flow Diagram
ControlTask()
Functions to Call Control Task Flags Pending
10ms
TimeSet()
DofWSet()
TempSet()
SetHys()
TAlarm1Set()
TAlarm2Set()
PasswordSet()
PhoneSet()
PhoneTest()
UIMenu()
UIMain()
KeyPend()
TimePend()
RingPend()
DTMFRing()