Download presentation
Presentation is loading. Please wait.
Published byBrianne Payne Modified over 9 years ago
1
Automatic Pressure Canning System System Software Design By: Michael Drysdale
2
General System Design MCU: MC9S12C32 MCU: MC9S12C32 Bus frequency 24 MHz Bus frequency 24 MHz 32Kb Flash, 2Kb RAM 32Kb Flash, 2Kb RAM System Memory Requirements System Memory Requirements 4K bytes Flash 4K bytes Flash 1k RAM 1k RAM Kernel Choice Kernel Choice Time slice with 10ms period Time slice with 10ms period
3
State Diagram ENTRY STAGE 1 PREHEAT STAGE 2 PRESSURIZED STAGE 3 DEPRESSURIZING Enter Cancel Target PSI Count down complete Cancel Up Down Shift Cancel
4
Priority of Tasks 1) Wait for Slice Task 2) Timer Task 3) PsiSample Task 4) Key Task 5) User Interface Task
5
Initialization System Initialization System Initialization ATD ATD OCDly OCDly Enable_INT Enable_INT LCD LCD RFID RFID Keypad Keypad Period Period Only run one time Only run one time Execution Time Execution Time ~ 100 ms ~ 100 ms
6
Timer Task Description: Decrements the time entered Period: 10ms (Periodic) Execution time ~ 1.5 us (max)
7
PsiSample Task Description: Reads Pressure Sensor Makes A/D conversions Updates the psi buffer Period: 10 ms (Periodic) Execution time ~ 1ms (max)
8
Key Task Description: Reads the keypad and updates the buffer Period: 10 ms (Periodic) Execution time ~ 2.2us (max)
9
User Interface Task Description: Updates LCDUpdates LCD Handles User inputsHandles User inputs Gets pressure and timer values.Gets pressure and timer values. Controls output for hotplateControls output for hotplate Period: 500ms (Periodic)Period: 500ms (Periodic) Execution time ~ 2.5 ms (max)Execution time ~ 2.5 ms (max)
10
CPU load L max= (1.5us) + (2.2us) + (2.5ms) + (1ms) (10ms) ( 10ms) (500ms) (10ms) L max= 10.5% L average =10.2 %
11
Modules ModuleTasks Public Functions and Data main.cWaitForSliceTask()UITask()ControlTask() Timer.cTimerTask()TimeSet()TimeGet() Lcd4Bit.c Todd Morton, Andrew Hall, modified Lcd4BitInit()LcdClrDisp()LcdClrLine()LcdDispDecByte()LcdDispStrg()LcdMoveCursor() Key.c Todd Morton, modified KeyTask()KeyInit()GetKey() OCDly.c Getmscnt() 9S12C32Start.c Todd Morton ATD.cPsiSampleTask()ATDInit()GetPsi()
12
Keypad Data Flow Diagram Keypad Keypad I/O KeyTask() key KeyFlag Keypad Driver Module Application KeyInit() GetKey()
13
LCD Data Flow UITask Initialization Psi Sample Timer LCD I/O LCD Module LcdInit() GetPsi() TimeGet () TimeSet ()
14
A-To-D Data Flow A to D A-to–D I/O PAD07 Ts =1ms A\D ConverterATD.c PsiSensorTask() ATDDR7 ATDCTL5 AN0-7
15
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.