You are currently viewing How to Interface ARM9 Stick with GPS SIM39 16×2 LCD

How to Interface ARM9 Stick with GPS SIM39 16×2 LCD

Spread the love

The is specifically designed to help students to master the required skills in the area of embedded systems. The board is designed in such way that all the possible features of the microcontroller will be easily used by the students. The board supports Keil µVision 4 compilers with Keil ULink2.

NXP Microcontroller,ARM9-LPC2929 stick board is proposed to smooth the progress of developing and debugging of various designs encompassing of speed 32-bit Microcontrollers. It integrates CAN, LIN, UART, ADC, PWM, I2C, SPI, Timer, Interrupt etc., to create a stand-alone versatile test platform.

ARM9 Stick Board having more no of I/O line for user access able. Its consists of 64 GPIO pins, CAN0/1, LIN1, I2C0/1, UART0/1, SPI0/1, USB, ADC0/1/2, PWM, Timer and more features. Users can easily access the controller and develop more application by using

GPS Module (SIM39EA)

It’s a high performance GPS modules accompany with GPS antenna-SIM39EAU. This is a standalone L1 frequency GPS module include an embedded patch antenna on it. Designed with MTK’s high sensitivity navigation engine, it allows you to achieve the industry’s highest levels of sensitivity, accuracy, and Time-to-First-Fix (TTFF) with lowest power consumption. And with embedded antenna in SMT type, it is very easy to embed into customer’s application.

PROJECT DESCRIPTION

Connecting wires:

The connecting wires are both sides having female type, because ARM9 stick, GPS and LCD models are having male type connector for interfacing.

Mode of GPS Interfacing:

  • Serial Interface UART

Output of GPS Module:

The output of GPS SIM39E module was taken from 16×2 LCD. Its display the latitude and longitude values of our GPS module where placed.

The Program receiving GPS data through UART and display that latitude and longitude values in 16×2 LCD has been downloading to ARM9 stick board.

Hardware’s:

  • ARM9 Stick Board
  • ULink2 for Download program
  • Base Board with GPS SIM39E module
  • USB Micro cable (for Stick board Power)
  • USB Mini cable (for ULink2)
  • 20 Pin FRC Cable (for interface Stick board and ULink)
  • LCD 16×2
  • Connecting Wires.

Software’s:

  • Keil UVision4

Note:

For easy interfacing purpose only we have to use the base board (PS-XBEE-PRJ Board) for GPS module. So without that base board, we can implement this project.

Functional Pin Diagram of ARM9 Stick Board

Front view of GPS SIM39EA Module

Note:

The GPS SIM39EA module will take 3 minutes’ time for to give a received GPS data. So wait till LED ‘D1’ becomes ON (glow), and then only we got the correct GPS data.

Pin Details of GPS SIM39EA Module

  • Pin 1 — VCC (3.3V)
  • Pin 2 — TXD (Connect to ARM9 RXD_UART0/1 in J2)
  • Pin10 — GND

Circuit for ARM9 Stick Interface with GPS Module

Real view of ARM9 Stick Interface with GPS Module

Output of received GPS Data

La – — Latitude value of GPS module

Lg – — Longitude value of GPS module

Values: ‘N’ North Pole 012 degree 57.8252’

              ‘E’ East Pole 080 degree 14.9703’

Some Tips about this project

1. The 16×2 LCD working in 4 bit mode. Its Anode (A), Cathode (K) and Contrast (CST) lines are configure as I/O lines and Set high as ‘A’, Set Low as ‘K’ & ‘CST’ by using program.

2. The GPS module have internal patch antenna. So no need external antenna.

3. The GPS module will get the GPS values and transmit the GPS data’s through TXD line in UART protocol.

4. ARM9 stick board will receive the GPS data’s through RXD line in UART protocol.

5. Display the latitude and longitude values in LCD

6. The ULink2 board was used only for downloading program to ARM9_LPC2929 stick board.

Downloading the Project file into Stick Board using Keil4

C Program for Interfacing GPS Module with ARM9 Stick Board

Program to interface ARM9 Stick with GPS

#include  //Register Description Header for LPC2929

#include 

 

#define RS 0x2 // Register Select

#define RW 0x4 // Read Write Select

#define EN 0x8 // Enable

 

#define D7 0x800 // Data Line 7

#define D6 0x400 // Data Line 6

#define D5 0x200 // Data Line 5

#define D4 0x100 // Data Line 4

 

#define A 0x100000 // LCD Anode

#define K 0x080000 // LCD Cathode

#define CST 0x0001 // LCD Contrast

 

#define CLK 12000000

#define BAUD 9600

 

#define DLAB_1 0x80

#define DLAB_0 0x7F

 

void CLOCK_Select(void);

void UART0_Init(void);

unsigned char Receive(void);

 

void lcd_cmd (char);

void lcd_data (unsigned char);

void lcd_initialize (void);

void lcd_display (void);

void LCD4_Convert(char);

void delay(int);

 

void gets_USART0(unsigned char *string);

void Get_GPS_USART0(unsigned char *GPS_Str);

void Put_GPS_LCD (unsigned char *gpsval);

 

void GPS_Logi (unsigned int n);

void GPS_Lati (unsigned int n);

 

char cmd[] = {0x33,0x32,0x28,0x0C,0x06,0x01}; // LCD Comments

char msg1[]= {"La:"}; // 1st Line of LCD

char msg2[]= {"Lg:"}; // 2nd Line of LCD

 

unsigned int Fdiv;

unsigned char *ptr,GPS_Rvdata[];

 

int main(void) // Main Function

 

{

GPIO3_DR |= 0xFFFF; // P3.0 to P3.15 config as Out Direction

GPIO1_DR |= (A|K); // Anode&Cathode config as Out Direction


GPIO1_OR |= (A); // Set Anode as High

GPIO1_OR &= ~(K); // Set Cathode as Low

GPIO3_OR &= ~(CST); // Set CST as Low


CLOCK_Select();

UART0_Init(); // UART0 Initialize

lcd_initialize(); // LCD Initialize

lcd_display(); // Display Char in LCD


while(1)

{

Get_GPS_USART0(GPS_Rvdata); // Read data from GPS module via UART0

Put_GPS_LCD (GPS_Rvdata); // Write GPS data to LCD

}

}

 

void delay(int n) // Delay function

 

{

unsigned int i,j;

for(i=0;i

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.