









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Western Washington University Western Washington University
By Dale Nelsen By Dale Nelsen
z z
z z
Bus Frequency 24MHz Bus Frequency 24MHz
z z
Memory Memory
50k Bytes Ram 50k Bytes Ram
4k Bytes Rom 4k Bytes Rom
z z
StartTask StartTask
z z
ClockTask ClockTask
z z
UITask UITask
z z
KeyTask KeyTask
z z
RelayControl RelayControl
z z
MainTask MainTask
z z
Discription Discription
Initialize System Initialize System
Create other tasks Create other tasks
Displays initial startup screen Displays initial startup screen
Priority 4 Priority 4
This runs once at startup and the execution This runs once at startup and the execution
time is 10ms time is 10ms
z z
Description Description
This handles the user inputs This handles the user inputs
Allows user to navigate through Allows user to navigate through different settings options different settings options
User can set time, date, ideal temp, User can set time, date, ideal temp,
ideal humidity and watering times ideal humidity and watering times
Priority six Priority six
Period Period
Æ Æ
.5s sporadic .5s sporadic
Execution time Execution time
Æ Æ
1ms 1ms
z z
Description Description
Reads the keypad Reads the keypad
Period Period
10ms 10ms
execution time execution time
2us 2us
Priority seven Priority seven
z z
Description Description
Updates the LCD Updates the LCD
Receives the Sensor Data Receives the Sensor Data
Receives User inputs Receives User inputs
Priority nine Priority nine
Period = 10ms Period = 10ms
Execution Time = 2ms Execution Time = 2ms
z z
Description Description
= This will generate a semaphore = This will generate a semaphore
every one second for the clock task every one second for the clock task to update the clock and also to check to update the clock and also to check temperature and humidity inputs temperature and humidity inputs
= Period = Period
1ms periodic 1ms periodic
= Execution Time = Execution Time
1us 1us
Modules Modules
Tasks Tasks
Functions Functions
Main.c Main.c
UITask UITask,
, StartTask
StartTask,
, UITask
UITask
LCD.c LCD.c
LcdInit LcdInit()
() LcdClrDisp
LcdClrDisp()
()
LcdMoveCursor LcdMoveCursor()
() LcdDispStrg
LcdDispStrg()
()
LcdDispTime LcdDispTime()
() LcdDispTemp
LcdDispTemp()
()
LcdCursor LcdCursor()
()
Key.c Key.c
Keytask Keytask
SPI.c SPI.c
ReadSPI ReadSPI()
() WriteSPI
WriteSPI()
()
InitSPI InitSPI()
()
Control.c Control.c
RelayControlTask RelayControlTask
ATOD.c ATOD.c
AtdInit AtdInit()
() AtdTempRead
AtdTempRead()
()
Clock.c Clock.c
ClockTask ClockTask
KeyFlag
KeyBuffer
KeyTask()
KeyPad
Functions
Key Code
KeyPend()
KeyInit()
timeset
RHset
Watertimeset
Clockset
UITask
LCD
ClockTask