System Software Design by Chan-Chia (James) Chang LED Display Panel System Software Design by Chan-Chia (James) Chang
General System Design MCU Motorola 9S12DP256B 24 MHz Bus Frequency 256K Byte Flash 12K Byte RAM 4K Byte EEPROM
Kernel Selection MicroC/OS-II Real-Time Preemptive Kernel
Priority of Tasks 4 – Start Task 5 – Clock Task 6 – TrafficLight Task 7 – LED Task 8 – KeyPress Task
Start Task Initialize the system Priority #4 Period: run it only once Execution time: 2ms
Clock Task Counts every second Priority #5 Period: 1sec, periodic Execution time: 1us
TrafficLight Task Control traffic lights Priority #6 Period: 0.5sec, periodic Execution time: 1us
LED Task Controls LEDs flash, and input data into LED drivers Priority #7 Period: 10ms, periodic Execution time: 48us
KeyPress Task Determent if someone pushes the buttons Priority #8 Period: 10ms, periodic Execution time: 2us
CPU Load Lmax = 1us + 1us + 48us + 2us 1s 0.5s 10ms 10ms Lmax = 0.5% Lavg = 0.26%
Modules Task Public Functions and Data Main.c Start Task Traffic.c TrafficLight Task Traffic() PICDisp.c LED Task PICDisp() LEDWrite.c LEDWrite() KeyPress.c KeyPress Task KeyInit(), KeyPend() Clock.c Clock Task Time()
Data Flow Diagram User Application Display Store Picture Display KeyPress.c LEDWrite.c PICDisp.c LED Display Display Traffic.c Traffic LEDs