C:\Users\Josh\Dropbox\RevGeo\Design Review\2012-02-28 21.08.43.jpg
Josh Marchi, Jeff King, Paul Rosenberger, Dan Chambers
– Software Design Considerations 
“Reverse Geocache” Box
Locked 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 onLCD.
Route stored on microSD card located inside the box,able to be reprogrammed by PC
RFID “master key” to allow access to box withoutfinishing puzzle
Project Overview
An ability to obtain and decode global positioning data inorder to verify if current location matches pre-determineddesired location.
An ability to utilize accelerometer and magnetometer datato determine a compass heading with tilt compensation.
An ability to access and interpret files located on a microSDcard.
An ability to display information to the user via an LCDdisplay.
An ability to identify an RFID tag using an RFID reader.
PSSCs
GPS coordinate analysis at a rate of 1Hz
Determine distance to next waypoint
Compass heading / tilt compensation at a rate ofapproximately 5Hz
Floating point values, trig functions required (lookuptable)
SD card interface uses MDD File System Library
Large amount of Flash/SRAM
Software Design	- Computational Requirements
PIC24FJ256GA106
16 Bit Architecture
Up to 16 MIPS CPU speed
256KB Flash
16KB RAM
Memory Disk Drive FileSystem Library Support
4 UART Modules
3 I2C Modules
3 SPI Modules
64 Total Pins
Software Design	- Microcontroller
Reasons for Selecting:
Enough UART/SPI/I2C channels
Adequate Flash/RAM for allcode/libraries
MDD File System Library Support
Interrupts Generated
UART Rx character received (GPS, RFID)
Flag set when entire message received
Periodic Timers (compass, fuel gauge polling)
Flag set, polling done in main loop
Main Loop
Analyze RFID message if flag is set
If ID matches “master key”, unlock box, play buzzer, update LCD
Analyze GPS message if flag is set
If GPS matches desired waypoint, load next waypoint, update LCD
If GPS doesn’t match waypoint, just update LCD with new position
Obtain Compass data if flag is set
Calculate heading with tilt compensation, update LCD
Obtain Fuel Gauge data if flag is set
Calculate 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