atmel:gpslcd

Introduction

gpslcd.jpg

This project details how to connect a Garmin GPS unit to a Futurlec AT90S2313 development board and decode the NMEA protocol onto an LCD display. The LCD display will cycle through the following information; Longitude, Latitude and the current date/time, holding each one for 2 seconds.

GPS LCD Source code as a ZIP file

Hardware Description
Atmel AVR Microcontroller Development System
This kit was kindly provided to me by the friendly people over at http://www.btinternet.com/~e2one/avrbrd/
lcd1x16.jpg 1×16 LCD Display
Details of how to wire up a 1×16 display to the development board can be found at http://www.btinternet.com/~e2one/avrbrd/ (see the LCD Project). If you use a larger display then you will have to modifying the code to suit.
GPS Unit
I used an eTrex Vista but any GPS unit that emits the NMEA protocol should be ok.
A GPS to RS232 breakout cable.
AVR board RS232 cable
4 Pin Molex wired to DB9-F
This cable should be supplied with the development board.
Null MODEM Adapter
DB9-M to DB9-M
Wiring details for this adapter are given below
  • As the ATMEL AT90S2313 only has 2k of code space the demo version of BASCOM can be used without hitting any of it's restrictions.
  • Hyperterminal or any suitable terminal emulation package. Useful for making sure that your GPS unit is tranmitted data.

GPS to Computer

First we make sure that your GPS unit is transmitted NMEA data.

  • Connect the GPS-RS232 cable to your GPS unit
  • Plug the cable into your computer
  • Fire up your terminal emulator and configure to 4800 baud, 8 data bits, No parity, 1 stop bit. 4800-N81

You should see a stream of communication beginning with the $ sign. The one that we are interested in is gprmc

$GPRTE,1,1,c,*37
$GPRMC,103044,A,5125.5210,N,00012.3645,W,0.0,304.9,290105,2.6,W,A*1E
$GPRMB,A,,,,,,,,,,,,A,A*0B
$GPGGA,103044,5125.5210,N,00012.3645,W,1,03,2.8,6.0,M,47.2,M,,*5E
$GPGSA,A,2,06,,,,,,21,,25,,,,2.9,2.8,1.0*31
$GPGSV,3,2,10,16,48,296,00,17,20,041,00,21,48,154,44,23,11,306,00*75
$GPGLL,5125.5210,N,00012.3645,W,103044,A,A*55
$GPBOD,,T,,M,,*47
$GPVTG,304.9,T,307.5,M,0.0,N,0.0,K*41
$PGRME,11.2,M,50.0,M,51.2,M*1F
$PGRMZ,-266,f*2B
$PGRMM,WGS 84*06
$HCHDG,200.1,,,2.6,W*3C

GPS to AVR board

The RS232 cable that comes with AVR development board is wired as a DTE, as the GPS unit is also a DTE we need an adapter.

You need to purchase or make a short cable to join the two, this is sometimes called a NULL modem cable and simply swaps pins 2 and 3 over.

Below is a wiring diagram for the 9 pin connectors

Connector1 Connector2 Function
2 3 Rx ← Tx
3 2 Tx → Rx
5 5 Signal ground
  • atmel/gpslcd.txt
  • Last modified: 2009/11/27 17:53
  • by 127.0.0.1