160 likes | 240 Views
Motorcycle Communication and Music Station. System Software Presentation Keith Mikoleit WWU 2010. General System Design. MCU: MC9S12XS128 Bus Frequency: 24 Mhz Memory Requirements ROM: ~ 4 Kbytes Program Storage RAM: ~ 500 bytes Variables and Data Available Memory 128 Kbytes Flash
E N D
Motorcycle Communication and Music Station System Software Presentation Keith Mikoleit WWU 2010
General System Design MCU: MC9S12XS128 Bus Frequency: 24 Mhz Memory Requirements • ROM: ~ 4 Kbytes • Program Storage • RAM: ~ 500 bytes • Variables and Data Available Memory • 128 Kbytes Flash • 8 Kbytes RAM
Kernel Design Time Slice Scheduler • Slice Period: 10 ms • Switch Debouncing • 4 + 1 Tasks • 2 ISRs
State Diagram PTT : Push to Talk
Key Task • Scan UI Switches • Interpret and Set Commands State Control Task • Switch System States • Control Audio Signal Switching
iPod Task • Send Commands to the iPod • Display iPod Data on LCD Intercom Task • PTT (Transceiver Control) • Send RF call • Check Incoming Call Data • Signal Strength A/D and Display
SCI0RD ISR • Read Data from SCI0 • Set iPod Data Ready Flag SCI1RD ISR • Read Data from SCI1 • Set RF Data Ready Flag
State Control UI Switch I/O Main.c Audio Control and RF I/O PA[3:0] PM[5] Key Task StateCtrlTask PAD[6:0] LCD I/O Mode Switch System State PT[7:1] PB[6:5] Intercom Task iPod Task
iPod Command Send UI Switch I/O Main.c Key Task To iPod SCI0 RemoteMode() AdvancedMode() iPodPlay() iPodStop() iPodBack() iPodForward() PAD[6:0] iPodTask Music Commands
iPod Data Receive iPodInterface.c Main.c LCD I/O SCI0RD From iPod PT[7:1] PB[6:5] SCI0 iPodTask iPod Data
RF Call Send Main.c StateCtrl Task To RF Tx SCI1 Call() IntercomTask System State
RF Call Receive Intercom.c Main.c LCD I/O SCI1RD From RF Rx PT[7:1] PB[6:5] SCI1 Intercom Task RF Data
Signal Strength A/D I/O A/D Converter Main.c ATDCTL5 From RSSI SignalStrength() AN7 Ts = 1 sec Intercom Task PAD[7] ADR0DR7H