This project demonstrates how to use the GPS smart antenna module LS20031 with the LPC1343 LPCXpresso Board and the LPCXpresso Base Board.

The first thing that needs to be done is to solder four wires to the GPS module and then connect them to the expansion dual row header connector on the LPCXpresso Base Board. Table 1 specifies the Pin description of the GPS module and Figure 2 shows how the module is connected to the base board.
| Pin # | Name | Type | Description |
|---|---|---|---|
| 1 | VCC | P | Power input |
| 2 | RX | I | Data input (TTL level) |
| 3 | TX | O | Data output (TTL level) |
| 4 | GND | P | Ground |
| 5 | GND | P | Ground |
Table 1 - PIN Description
RX on the module should be plugged in to PIO1_7-TDX on the base board and TX on the module should be plugged in to PIO1_6-RXD on the base board. VCC for LS20031 is Min 3V, Max 4.2V and Typ 3.3V.

The GPS module uses protocol NMEA 0183 ver. 3.01. There are six different NMEA output messages on the GPS:
In our example we only use GGA. The output message is a text string and could look something like this: $GPGGA,173415.400,3514.5974,N,12037.2028,W,1,8,1.18, 84.6,M,-30.8,M,,*50
Comma e.g. ‘,’ is the divider between the different values. $GPGGA is the protocol header for GGA. Next we have the UTC time and then the latitude value and so on. More information on the different output messages can be found in the LS20031 datasheet.
One thing that is good to know is that the datasheet states that the GPS module uses 9600bps, but this did not work. A 5Hz GPS's need more bandwidth. At Sparkfun product page it states to use 57600bps, which works better.
This is how main() could look like. In main() we need to initiate timers if we want to use delays, install the GPIO interrupt handler, initialize SSP port routine, initialize and clear the OLED screen, if we want to use the joystick we need to initialize this as well and finally we need to initialize the UART to 57600 baud rate. The only thing left to do now is to parse out the data from the GPS module and show it on the OLED-display and that's the easy part.
int main(void)
{
init_timer32(0, 10);
GPIOInit();
SSPInit();
oled_init();
oled_clearScreen(OLED_COLOR_WHITE);
joystick_init();
UARTInit(57600);
while(1) {
uint8_t joyState = joystick_read();
if ((joyState & JOYSTICK_CENTER) != 0) {
//Break the loop if joystick center is pressed
break;
}
parseGpsData();
// Update every second
delay32Ms(0, 1000);
}
return 1;
}
Begin by importing the driver and sample application bundle (zip file) for the LPC1343 LPCXpresso Board found at the Embedded Artists support site.
The second step is to import GPS module project. Do the same as when importing the drivers, but choose LS20031_gps_example.zip in step 2. To build or debug the example just click build/debug in the QuickStart tab
More information on how to work with the LPCXpresso Base Board as well as the LPCXpresso IDE can be found in the User's Manual for the LPCXpresso Base Board. This User's Manual can be found at the Embedded Artists support site.
