Presentation is loading. Please wait.

Presentation is loading. Please wait.

System Software Design GPS Training System Jason Corbridge May 8, 2008 Western Washington University.

Similar presentations


Presentation on theme: "System Software Design GPS Training System Jason Corbridge May 8, 2008 Western Washington University."— Presentation transcript:

1 System Software Design GPS Training System Jason Corbridge May 8, 2008 Western Washington University

2 Microcontroller Motorola MC9S12DP512 Motorola MC9S12DP512 Bus Frequency 24 MHz Bus Frequency 24 MHz Available Memory Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes RAM512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes RAM Required Memory Required Memory 15K bytes ROM15K bytes ROM 4K bytes RAM4K bytes RAM MicroC/OS-II MicroC/OS-II Real-time preemptive multitasking kernelReal-time preemptive multitasking kernel 1 ms tick period1 ms tick period

3 Priority of Tasks Start TaskPriority: 4 Start TaskPriority: 4 Button TaskPriority: 5 Button TaskPriority: 5 Clock Task Priority: 6 Clock Task Priority: 6 GPS Task Priority: 7 GPS Task Priority: 7 User Interface TaskPriority: 8 User Interface TaskPriority: 8

4 Start Task Creates other tasks Creates other tasks Initializes MicroC/OS, GPS, and LCD Initializes MicroC/OS, GPS, and LCD Priority: 4 Priority: 4 Period: Executes only once at startup Period: Executes only once at startup Execution Time: ~ 200 ms (max) Execution Time: ~ 200 ms (max)

5 Button Task Senses button presses Senses button presses Debounces buttons Debounces buttons Priority: 5 Priority: 5 Period: 20 ms (periodic) Period: 20 ms (periodic) Execution Time: 20 us (max) Execution Time: 20 us (max) CPU Load: 0.1% CPU Load: 0.1%

6 Clock Task Keeps track of workout time Keeps track of workout time Displays workout time to LCD Displays workout time to LCD Priority: 6 Priority: 6 Period: 100 ms (Periodic) Period: 100 ms (Periodic) Execution Time: ~ 500 us (max) Execution Time: ~ 500 us (max) CPU Load: 0.5% CPU Load: 0.5%

7 GPS Task Receives and deciphers messages from the GPS Receives and deciphers messages from the GPS Converts speed and elevation data to be displayed Converts speed and elevation data to be displayed Calculates distance and average speed Calculates distance and average speed Displays speed, elevation, and distance Displays speed, elevation, and distance Priority: 7 Priority: 7 Period: 1 second Period: 1 second Execution Time: ~ 330 ms (max) Execution Time: ~ 330 ms (max) CPU Load: 33.0% CPU Load: 33.0%

8 User Interface Task Controls the functions of the buttons Controls the functions of the buttons Prepares data to be output to a computer Prepares data to be output to a computer Priority: 8 Priority: 8 Period: Sporadic Period: Sporadic Execution Time: ~ 100 us (max) Execution Time: ~ 100 us (max)

9 CPU Load L max = (500 us) + (330 ms) + (20 us) L max = (500 us) + (330 ms) + (20 us) (100 ms) (1 sec) (20 ms) (100 ms) (1 sec) (20 ms) L max = 33.6% L max = 33.6% L average = 20.2% L average = 20.2%

10 Module Description ModulesTasks Public Functions Public Data GPS.c Start Task, GPS Task PGRMI()PGRMC()PGRMC1()PGRMO()GPGGA()GPRMC()ElevationCurrentSpeedAverageSpeedDistance Button.c Button Task, User Interface Task LCD.c Code written by Todd Morton LcdInit()LcdClrLine()LcdDispChar()LcdDispByte()LcdDispStrg()LcdMoveCursor()LcdDispDecByte()LcdDispTime() SCI.c Code written by Justin Klumpp SCIInit()SCIRead()SCIWrite() Clock.c Clock Task Time

11 LCD Data Flow Diagram

12 Button Data Flow Diagram


Download ppt "System Software Design GPS Training System Jason Corbridge May 8, 2008 Western Washington University."

Similar presentations


Ads by Google