Download presentation
Presentation is loading. Please wait.
Published byHubert Barton Modified over 9 years ago
1
Multi-Access Lock Andrew Hall
2
General System Requirements MCU: MC9S12C128 Bus Frequency: 24MHz Memory Requirements: 11k bytes Flash EEPROM 3k bytes RAM Kernel: MicroC/OS-II Tick Period: 1ms
3
Task Priorities 4)Start Task 5)Mag. Reader Task 6)User Interface Task 7)Keypad Task
4
Start Task Initializes the system Creates the other tasks Priority: 4 Period: once (at start-up) Execution Time: ~ 1 sec
5
Mag. Reader Task Reads the card data Priority: 5 Period: 200 ms (sporadic) Execution Time: 2ms (max)
6
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)
7
Keypad Scans keypad Priority: 7 Period: 10ms(sporadic) Execution Time:~2.2us(max)
8
CPU Load Lmax = 2ms + 2ms + 2.2us 200ms 20ms 10ms Lmax =.11 Lavg =.017
9
Modules TasksPublic Functions MultiAccessLock.c Original Start Task User Interface Task OSTickInit(), KeyInit(), LcdInit4Bit(), sci_open(), LcdClrDisp(), LcdMoveCursor(), LcdDispStrg(), getstrg(), OSTimeDly(), LcdBSpace(), OSTaskResume(), OSTaskSuspend(), OSTaskDel(), OSTaskCreate(), MagReadPend(), EESectErase(), EESectModify(), ConfigECLKDIV() MagReader.c Original Mag. Reader Task OSTaskCreate(), OSTimeDly(), OSSemPost(), getstrg() KeyUcos.c Written by: Todd Morton, modified Keypad TaskOSSemPend() OSTaskCreate(), OSSemPost(), OSTimeDly()
10
Data Flow Diagrams MultiAccessLock.c LCD4Bit I/O User prompts Unlock door Store Memory (user name & pin) Test data User input ProgEeprom.c EEWordWrite()
11
Data Flow Diagrams Magnetic Strip Reader Module MultiAccessLock MagReadInit() MagReadPost() MagReader I/O MagReadTask() MagKey MagFlag
12
Data Flow Diagrams Keypad Driver Module MultiAccessLock KeyInit() KeyPend() Keypad I/O KeyTask() key KeyFlag
13
Questions or Comments?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.