90 likes | 276 Views
Team 7: Persistence of Vision Machine. Software Design Considerations, Narrative, and Documentation. Steve Andre Eric Glover Shaun Greene Russell Willmot. PSSC’s. An ability to: display a pattern with rotating LEDs control the direction in which the pattern is being projected
E N D
Team 7: Persistence of Vision Machine Software Design Considerations, Narrative, and Documentation Steve Andre Eric Glover Shaun Greene Russell Willmot
PSSC’s An ability to: • display a pattern with rotating LEDs • control the direction in which the pattern is being projected • track the angle of arrival of an RF beacon • update a projected image while the machine is in operation • accept user-generated input to change display
Software Considerations • Primary functions of microcontroller 1 of 2 • Stationary (ARM Cortex M3) • User interface (5 push buttons & OLED) • Read temperature (ATD 1) • Angle detection & calculation (ATD 2 & 3) • Pixel-map generation • encodes data for transceiver • Control transceiver (SPI) • Motor on/off (GIO) • Measure motor speed (EINT) • Polling “state machine” with few interrupts Pushbuttons and OLED configuration 128x96 OLED
Software Considerations • Primary functions of microcontroller 2 of 2 • Rotating (PIC24F) • Control transceiver (SPI 1) • Send data to LED drivers (SPI 2) • Detects 0° reference of spinning disc (EINT) • Calculate motor speed (TIM1/2) • Convert angle to offset time from RPM • Calculate time of a column • Interrupt driven
Lower µC Block Diagram - ARM Power On Configure OLED Display Welcome Configure µMIRF Display Main Menu On any button push User input no Display screen saver yes Set “state” Jump to selected function no yes User input
Lower µC Block Diagram - ARM • Functions • Display temperature • Display time • Display motor speed • Display beacon angle • Display picture • User input text • Toggle beacon follow mode Selected Function Get required data Generate pixel map Display data on OLED Send data to µMIRF return
Upper µC Block Diagram - PIC24F Power On Interrupts • EINT – 0° pulse from IR sensor • reads running timer (TIM1/2) and calculates speed • enables “delay” interrupt • TIM3 – “delay” timer to generate angle offset • Enable column timer • TIM4 – column timer • Pulse the latch of LED Driver • SPI1 – read data from µMIRF and store it Initialize ports, pins, and registers Configure µMIRF (SPI 1) Perform speed/column time calculation Send data to LED drivers? no Send data to LED drivers (SPI 2) Yes
Transceiver data format Control byte • Control Bits • 0 0 : nothing new • 1 0 : new pixel map • 0 1 : new offset value • 1 1 : both are new • If the offset is new, the offset portion is read • Value in degrees with 10° increments (00001 = 10°) • If the pixel map is new, the next 1152 bytes are the data for the image • The received image is in a separate buffer that the image being output 7 6 5 4 3 2 1 0 Controlbits Degree offset of display