Functionalities of the AVR MCU are due to the program embedded into its internal flash memory. The software program is written in C language using AVR studio software. It is compiled using GCC compiler available with AVR studio. When the program is compiled successfully, it generates a hex file, which is loaded into ATmega16A using AVR SPI programmer.
[stextbox id=”grey” caption=”C program is made up of 12 different functions described as follows:”]LCD_sendcmd sends an 8-bit command (character) to the LCD to initialise or configure it.
LCD_senddata sends 8-bit data (character) to the LCD, which is displayed on the screen.
LCD_write_string displays the complete string (message) on the LCD.
LCD_init initialises the LCD in 8-bit mode, 8×5 dots/character USART handling function.
usart_init initialises built-in USART and set baud rate to 9600 bps.
usart_getch returns one character (8-bit data) received from the serial port.
display_latitude displays the received latitude on the LCD in degree-minute-second format.
display_longitude displays the received longitude on the LCD in degree-minute-second format.
display_date displays the date (as per GMT) on the LCD in dd/mm/yy format.
display_time displays Indian Standard Time (IST) on the LCD in hh:mm:ss format.
display_speed displays GPS antenna speed in knots with 1-digit precision after decimal point as xxx.x knots.
display_course displays the GPS antenna angle with respect to true North in counter-clockwise direction.[/stextbox]
Construction and testing
An actual-size, single-side PCB for the GPS receiver is shown in Fig. 4 and its component layout in Fig. 5.
Note. The system displays the received string from GPS directly on the LCD. It does not manipulate the GPS parameters. So all parameters given by the GPS receiver are directly displayed on the LCD screen. To check the validity of values, check the validity of the received signal (using hyper terminal).
Ashutosh M. Bhatt is M.Tech in embedded systems. Currently, he is a lecturer of electronics and radio engineering at government polytechnic, Jamnagar, Gujarat