150 likes | 321 Views
Automatic Pressure Canning System. System Software Design By: Michael Drysdale. General System Design. MCU: MC9S12C32 Bus frequency 24 MHz 32Kb Flash, 2Kb RAM System Memory Requirements 4K bytes Flash 1k RAM Kernel Choice Time slice with 10ms period. State Diagram. STAGE 1
E N D
Automatic Pressure Canning System System Software Design By: Michael Drysdale
General System Design MCU: MC9S12C32 Bus frequency 24 MHz 32Kb Flash, 2Kb RAM System Memory Requirements 4K bytes Flash 1k RAM Kernel Choice Time slice with 10ms period
State Diagram STAGE 1 PREHEAT Target PSI Enter Up Down Shift Cancel Cancel ENTRY STAGE 2 PRESSURIZED Cancel Cancel STAGE 3 DEPRESSURIZING Count down complete
Priority of Tasks Wait for Slice Task Timer Task PsiSample Task Key Task User Interface Task
Initialization • System Initialization • ATD • OCDly • Enable_INT • LCD • RFID • Keypad • Period • Only run one time • Execution Time • ~ 100 ms
Timer Task Description: Decrements the time entered Period: 10ms (Periodic) Execution time ~ 1.5 us (max)
PsiSample Task Description: Reads Pressure Sensor Makes A/D conversions Updates the psi buffer Period: 10 ms (Periodic) Execution time ~ 1ms (max)
Key Task Description: Reads the keypad and updates the buffer Period: 10 ms (Periodic) Execution time ~ 2.2us (max)
User Interface Task Description: Updates LCD Handles User inputs Gets pressure and timer values. Controls output for hotplate Period: 500ms (Periodic) Execution time ~ 2.5 ms (max)
CPU load L max= (1.5us) + (2.2us) + (2.5ms) + (1ms) (10ms) ( 10ms) (500ms) (10ms) L max= 10.5% L average =10.2 %
Keypad Data Flow Diagram KeyFlag Keypad Driver Module Keypad I/O Application Keypad KeyInit() GetKey() KeyTask() key
LCD Data Flow LCD I/O LCD Module Initialization LcdInit() Psi Sample GetPsi() UITask Timer TimeGet () TimeSet ()
A-To-D Data Flow A to D ATD.c A\D Converter A-to–D I/O Ts =1ms ATDCTL5 AN0-7 PsiSensorTask() PAD07 ATDDR7