High Level Design
The basic structure of the device is to take input from a 4 x 4 keypad and display all
output on a 4 x 20 character LCD screen. Upon startup, a main menu is displayed
on the LCD, listing all options/features available to the user. The menu options are
To implement these features, we designed state machines to control different aspects of the system. The state machines and
database were programmed onto an Atmel Mega163 microcontroller chip. An STK500 development board was used to
connect the various hardware elements needed for the device.
Date and Time - This option displays a submenu of date and time options. From this submenu,
the user can view and set the date and time, or return to the main menu.
Nearest City - This option displays the nearest city to the user along with the distance and
direction, based on the userís current coordinates. These coordinates are either inputted
manually by the user upon selecting this option, or are automatically obtained if the user is
in NMEA mode (see option 6).
Directions to a City - This option displays a listing of directions between the userís nearest
city and a major city that will be selected by the user. Once again, the userís coordinates
are either entered manually or are obtained automatically via an external GPS receiver.
These coordinates are used to determine the nearest city to the user. The user is then prompted
to select a destination from a given list of major cities. Upon selecting a destination, the
directions will be computed and displayed. The user will be able to scroll through each step of
the directions. Each step consists of a departure city, an arrival city, and the distance and
interstate connecting them.
Distance Between Cities - This option displays the absolute distance between any two cities
in the database. When this option is selected, the user is prompted to choose a departure
and arrival city.
Directions Between Cities - This option is identical to option 3, except that the user is prompted
to choose both an arrival city and a departure city, as opposed to only an arrival city. A nearest
city is not computed for this option since the user selects the departure city.
Select Input Mode - This option allows the user to select between NMEA mode and Manual mode.
When in NMEA mode, the userís coordinates will be continually inputted through the UART from
a GPS receiver. The UART will be expecting NMEA v0183 RMC sentences. When in Manual
mode, the user will be prompted to enter his/her current coordinates when necessary.
Display Coordinates - This option displays the userís current coordinates. When in NMEA mode,
these coordinates will be continually updated. When in Manual mode, the coordinates shown will
be the last coordinates entered by the user.