Virtual Presence Vehicle Team 13 Jason Giles John Ashmore Jing Li Brian Bell
Software Main Loop Two Microcontrollers Interrupt Driven Base Station Remote Station Software
Base Station Routines Base Routines Interrupt Speed Interface PS2 Controller Fast SPI On Screen Display Medium Transceiver Power Meter Slow PWM Base Station Routines
Flowbullets (Base) Power On Initialize Turn on Interrupts Main Loop PS2 Controller On Screen Display Power Transceiver Flowbullets (Base)
Remote Station Routines Remote Routines Interrupt Speed Interface Compass Medium I2C Transceiver Fast SPI Servo Vertical Slow PWM Servo Horizontal Servo Steering Motor Driver Power Meter Remote Station Routines
Flowbullets (Remote) 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
I2C 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 // do some initializations pwm1_isr(OC1_VECTOR, ipl3) { /* do stuff */ // clear the OC1 interrupt flags IFS0CLR = 0x0040; } PWM ISR
PS2 Controller (SPI) Last two bytes are button states 512 kbps Byte 1 3 4 5 Command 0x01 0x42 0x00 Data 0xFF 0x41 0x5A Last two bytes are button states 512 kbps PS2 Controller (SPI)
On Screen Display (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)
Other Routines Routine Interrupts Compass I2C Receive Servo PWM Control Motor Driver PWM to Motor Driver Other Routines