Presentation is loading. Please wait.

Presentation is loading. Please wait.

BICYCLE SECURITY AND TRIP COMPUTER MATTHEW ROTHNIE WESTERN WASHINGTON UNIVERSITY 4/25/12.

Similar presentations


Presentation on theme: "BICYCLE SECURITY AND TRIP COMPUTER MATTHEW ROTHNIE WESTERN WASHINGTON UNIVERSITY 4/25/12."— Presentation transcript:

1 BICYCLE SECURITY AND TRIP COMPUTER MATTHEW ROTHNIE WESTERN WASHINGTON UNIVERSITY 4/25/12

2  MCU- MC9S12C128 16-bit  128-K Flash EEPROM, 4KB RAM 31 GPIO  25MHz bus speed  ROM- no ROM  Flash EEPROM- 4K  RAM- 1K  Resources- 23 GPIO

3  Kernel- Timeslice  Pre-emptive real-time Kernel  Tick period- 100 mS  Task and ISR total-  Start, Data, Key, Alarm, Sensor, Alarm ISR, Sensor ISR and Toggle ISR

4  Initializes all Resources  Period- Once at beginning  Execution time- ~500 mS

5  Scans Keypad and updates buffer  Period- 10 mS  Execution Time- ~1 mS  CPU load = 1 mS/10 mS = 10%

6  Handles user input  Gets speed values from the Speed-Sensor  Updates LCD values  Does all calculations for speed and distance  Handles Alarm Driver output  Period- 500 mS  Execution Time- ~30 mS  CPU load = 30 mS/500 mS = 6%

7  Handles the alarm interrupts from the sensor, secure-loop and keypad entry  Period- Sporadic  Execution time- 1 mS

8  Takes all the output from the Hall Effect sensor and converts to timing information that can be used for the Data function  Scans Sensor output and updates buffer  Period- ~10 mS  Execution Time- ~1 mS

9  Gives output voltage for Buzzer Driver when alarm is “on” and the sensor reports movement  Period- Sporadic  Execution Time- ~2 mS

10  Goes into initialization routine after this interrupt occurs  Period- Sporadic  Execution Time- ~1 mS

11 Load (max) = 10% + 6% = (with rounding) ~ 20%

12 ModuleTasksPublic Functions Main.cStart() Data() Alarm() Sensor() CalculateSpeed() CalculateDistance() LCD4Bit.cLCDSpeed() LCDDistance() LCDCalculation Key.cKeyTask()KeyInit() GetKey()

13 KEYSCAN KEYPAD KEY TABLE Key Flag KEY KeyPend() KeyInit()

14 CalculateSpeed() CalculateDistance() Buzzer() ALARM DRIVER Main.c Sensor() Alarm() LCD

15 IRQ Alarm() ISR Flag

16 XIRQ ISR Flag Alarm()

17 PP 05 ISR Flag Alarm()


Download ppt "BICYCLE SECURITY AND TRIP COMPUTER MATTHEW ROTHNIE WESTERN WASHINGTON UNIVERSITY 4/25/12."

Similar presentations


Ads by Google