130 likes | 248 Views
Multi-Access Lock. Andrew Hall. General System Requirements. MCU: MC9S12C128 Bus Frequency: 24MHz Memory Requirements: 11k bytes Flash EEPROM 3k bytes RAM Kernel: MicroC/OS-II Tick Period: 1ms. Task Priorities. Start Task Mag. Reader Task User Interface Task Keypad Task.
E N D
Multi-Access Lock Andrew Hall
General System Requirements • MCU: MC9S12C128 • Bus Frequency: 24MHz • Memory Requirements: • 11k bytes Flash EEPROM • 3k bytes RAM • Kernel: MicroC/OS-II • Tick Period: 1ms
Task Priorities • Start Task • Mag. Reader Task • User Interface Task • Keypad Task
Start Task • Initializes the system • Creates the other tasks • Priority: 4 • Period: once (at start-up) • Execution Time: ~ 1 sec
Mag. Reader Task • Reads the card data • Priority: 5 • Period: 200 ms (sporadic) • Execution Time: 2ms (max)
User Interface Task • Displays user prompt • Receives and tests user inputs • Saves user name and pin# • Controls locking mechanism • Priority: 6 • Period: 20ms(sporadic) • Execution Time: 2ms(max)
Keypad • Scans keypad • Priority: 7 • Period: 10ms(sporadic) • Execution Time:~2.2us(max)
CPU Load Lmax = 2ms + 2ms + 2.2us 200ms 20ms 10ms Lmax = .11 Lavg = .017
Data Flow Diagrams MultiAccessLock.c ProgEeprom.c LCD4Bit I/O User input Store Memory (user name & pin) Test data User prompts EEWordWrite() Unlock door
MagFlag Data Flow Diagrams Magnetic Strip Reader Module MagReader I/O MultiAccessLock MagReadTask() MagReadInit() MagReadPost() MagKey
KeyFlag Data Flow Diagrams Keypad Driver Module Keypad I/O MultiAccessLock KeyInit() KeyPend() KeyTask() key