130 likes | 216 Views
This software design utilizes the Motorola MC9S12C32 microcontroller for ATV instrumentation display with tasks such as RPM monitoring, clock updating, and user interface management. The system is based on the MicroC/OS-II kernel for real-time multitasking.
E N D
ATV INSTRUMENTATIONDISPLAY System Software Design Ed Raezer
General System Design • Motorola MC9S12C32 w/ 32k Bytes EEPROM, 2K Bytes RAM • 16 MHz Bus Frequency • Memory Requirements for Project 8K ROM, 1K RAM
Kernel Selection • Kernel Choice: MicroC/OS-II Real-time preemptive multitasking kernel with a 1 ms tick period • Configured for my program • Modify (os_cfg.h)
Task Priority 4- Start Task 5- User Interface 6- RPM Task 7- Speed Task 8- Clock Task
Start Task Description: -Initializations -Creates Tasks -Priority #4 -Period: once (at startup) -Execution time: 200 msec
Clock Task Description: -Retrieves time from RTC -Updates time buffer -Period: 1 sec (Periodic) -Execution Time: 35 usec -L = .000035
User Interface Task Description: -Monitors the buttons -Sets Clock -Activates LEDs -Changes Display Modes -Execution Time: 1 msec -Period: 10 ms -L = .1
RPM Task Description: -Retrieves pulse count from pulse accumulator and converts to RPMs -Updates RPM buffer -Period: 500 msec -Execution Time: 20 usec -L = .00004
Speed Task Description: -Monitors wheel sensor, counts pulses and converts to speed and distance -Updates odometer -Updates speed buffer -Execution time: 20 usec -Period: quick as 50msec (ISR driven) -L = .0004
ISR • Creates a semaphore everytime a wheel sensor pulse is detected so Wheel Task can run • Period: up to 50 msec • Execution time: 300 nsec • L = .000006
CPU Load L = .000035+.1+.00004+.0004+.000006= .100481 LMAX = 10.05%