josh marchi, jeff king, paul rosenberger, dan chambers – software design considerations –
Post on 17-Jan-2016
216 Views
Preview:
TRANSCRIPT
Josh Marchi, Jeff King, Paul Rosenberger, Dan Chambers
– Software Design Considerations –
“Reverse Geocache” BoxLocked box that will only open after one or
more pre-determined GPS locations have been visited
Directs user to next location by GPS coordinates, compass heading, or text description displayed on LCD.
Route stored on microSD card located inside the box, able to be reprogrammed by PC
RFID “master key” to allow access to box without finishing puzzle
Project Overview
An ability to obtain and decode global positioning data in order to verify if current location matches pre-determined desired location.
An ability to utilize accelerometer and magnetometer data to determine a compass heading with tilt compensation.
An ability to access and interpret files located on a microSD card.
An ability to display information to the user via an LCD display.
An ability to identify an RFID tag using an RFID reader.
PSSCs
GPS coordinate analysis at a rate of 1HzDetermine distance to next waypoint
Compass heading / tilt compensation at a rate of approximately 5HzFloating point values, trig functions required
(lookup table)SD card interface uses MDD File System
LibraryLarge amount of Flash/SRAM
Software Design- Computational Requirements
PIC24FJ256GA10616 Bit ArchitectureUp to 16 MIPS CPU speed256KB Flash16KB RAMMemory Disk Drive File
System Library Support4 UART Modules3 I2C Modules3 SPI Modules64 Total Pins
Software Design- Microcontroller
Reasons for Selecting: Enough UART/SPI/I2C channels Adequate Flash/RAM for all
code/libraries MDD File System Library Support
Interrupts GeneratedUART Rx character received (GPS, RFID)
Flag set when entire message receivedPeriodic Timers (compass, fuel gauge polling)
Flag set, polling done in main loop
Main LoopAnalyze RFID message if flag is set
If ID matches “master key”, unlock box, play buzzer, update LCDAnalyze GPS message if flag is set
If GPS matches desired waypoint, load next waypoint, update LCDIf GPS doesn’t match waypoint, just update LCD with new position
Obtain Compass data if flag is setCalculate heading with tilt compensation, update LCD
Obtain Fuel Gauge data if flag is setCalculate and update LCD
Software Design- Code Organization (Interrupt/Polling Hybrid)
Software Design- Initialization Flowchart
Software Design- Main Loop Flowchart
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (PC Debug Interface)
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (RFID Module Interface)
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (GPS Interface)
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (Compass Interface)
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (Fuel Gauge Interface)
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (MicroSD Interface)
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (LCD Interface)
Software Design- Code Hierarchy (TOP)
Software Design- Code Hierarchy (Miscellaneous Interfaces)
Questions/Discussion
top related