180 likes | 374 Views
LED CUBE. Preliminary System Software Design Fernando J. Garcia May 16 2013. Microcontroller. MC9S12DP512 Bus frequency of 24MHz Memory Requirements ROM ~13K bytes RAM 4K bytes. Kernel. MicroC/OS-II Real-time preemptive multitasking kernel Priority Based 1 ms tick period 1 ISRs
E N D
LED CUBE Preliminary System Software Design Fernando J. Garcia May 16 2013
Microcontroller MC9S12DP512 • Bus frequency of 24MHz • Memory Requirements • ROM ~13K bytes • RAM 4K bytes
Kernel MicroC/OS-II • Real-time preemptive multitasking kernel • Priority Based • 1 ms tick period • 1 ISRs • Intertask communication • Mutexes • Semaphores
Start Task Description: • Initializes the system • Creates other tasks • Pulses cube lights • Priority #4 • Period: Once (startup) • Execution time ~2s
PWM Task Description: • Resets timer required by LED drivers for PWM • Interrupt based • Priority #5 • Period: 166μs • Execution time(max): 1.6μs • CPU Load: 0.9%
Transmit Task Description: • Transmit data over SPI (Serial Peripheral Interface) • Priority #6 • Period Sporadic 16ms • Execution time(max): 98μs • CPU Load: 0.6125%
Key Task Description: • Periodically Scans keypad • Priority #7 • Period: 10ms • Execution time(max): 10μs • CPU Load: 0.1%
Computations Task Description: • Calculates data to be transmitted to the LED drivers • Priority #8 • Period: ~100ms (Sporadic) • Execution time(max): ~10ms • CPU load: ~10%
User Interface Task Description: • Updates LCD, controls program states, and functionality of button presses • Priority: 9 • Period: 100ms(Sporadic) • Execution Time(max): ~10ms • CPU load: ~10%
Total CPU Load L_max = 21.62% Average= 15%