130 likes | 230 Vues
Virtual Presence Vehicle Team 13. Jason Giles John Ashmore Jing Li Brian Bell. Main Loop Interrupt Driven Two Microcontrollers Base Station Remote Station. Software. Base Station Routines. Power On Initialize Turn on Interrupts Main Loop PS2 Controller On Screen Display Power
E N D
Virtual Presence VehicleTeam 13 Jason Giles John Ashmore Jing Li Brian Bell
Main Loop • Interrupt Driven • Two Microcontrollers • Base Station • Remote Station Software
Power On • Initialize • Turn on Interrupts • Main Loop • PS2 Controller • On Screen Display • Power • Transceiver Flowbullets (Base)
Power On • Initialize • Turn on Interrupts • Main Loop • Compass • Servos • Motor Driver • Power • Transceiver Flowbullets (Remote)
// do some initializations spi_isr(VECTOR, ipl3) { int Data; // Read SPI data buffer Data = SPI1BUF; /* do stuff */ // clear the SPI1 interrupt flags IFS0CLR = 0x03800000; } SPI ISR
// do some initializations iic_isr(VECTOR, ipl3) { case Start /* stuff */ ACK NACK Stop // clear interrupts IIC0CLR = 0x0440 } I2C ISR
// do some initializations pwm1_isr(OC1_VECTOR, ipl3) { /* do stuff */ // clear the OC1 interrupt flags IFS0CLR = 0x0040; } PWM ISR
Last two bytes are button states • 512 kbps PS2 Controller (SPI)
Data • Compass • Battery • Routine • Send initialization data bytes • Send address byte • Send data byte On Screen Display (SPI)
Calibration • RX Setup • Read Byte • TX Setup • Send Byte Transceiver (SPI)