TI ez430-rf2500 with D2523T GPS Module

I’m recently doing a school project for a GPS tracking system with TI ez430-rf2500 with D2523T GPS Module.

I thought by connecting both the GPS module and the microcontrollers’ RX/TX pin and put the UART transmitter code at Baud rate = 9600 Hz(see below), I would be able to receive the data from GPS.

Unfortunately, the microcontroller that is connected with the GPS module does not receive anything

void main(void)
{
  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
  P1DIR = 0xFF;                             // All P1.x outputs
  P1OUT = 0;                                // All P1.x reset
  P2DIR = 0xFF;                             // All P2.x outputs
  P2OUT = 0;                                // All P2.x reset
  P3SEL = 0x30;                             // P3.4,5 = USCI_A0 TXD/RXD
  P3DIR = 0xFF;                             // All P3.x outputs
  P3OUT = 0;                                // All P3.x reset
  P4DIR = 0xFF;                             // All P4.x outputs
  P4OUT = 0;                                // All P4.x reset
  UCA0CTL1 |= UCSSEL_1;                     // CLK = ACLK
  UCA0BR0 = 0x03;                           // 32kHz/9600 = 3.41
  UCA0BR1 = 0x00;                           //
  UCA0MCTL = UCBRS1 + UCBRS0;               // Modulation UCBRSx = 3
  UCA0CTL1 &= ~UCSWRST;                     // **Initialize USCI state machine**
  IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt

  __bis_SR_register(LPM3_bits + GIE);       // Enter LPM3, interrupts enabled
}

// Echo back RXed character, confirm TX buffer is ready first
#pragma vector=USCIAB0RX_VECTOR
__interrupt void USCI0RX_ISR(void)
{
  while (!(IFG2&UCA0TXIFG));                 // USCI_A0 TX buffer ready?
  UCA0TXBUF = UCA0RXBUF;                     // TX -> RXed character
}

Unfortunately what you want to do is not that simple. The remote application reads some registers and created packets sent to the other unit. The remote unit code does nothing with the serial port. The recieving end takes the packets, extracts the data, formats it in a way the PC program understands, and sends it out the serial port. The serial port on the receiving end is the only active port.

In order to do what you want to do, you will need to rewrite the remote unit code so that it reads the serial port, puts the data into packets, and then sends the data on the rf link. The recieving end code needs to extract the data from the packet and then just ship it out the serial port without formatting it.

What’s the point of the uC? You can just hook the GPS right up to an xbee if all you need is a remote GPS…

John

A few observations:

  1. I don’t believe the ez340-rf2500 has a 32.768KHz crystal installed.

  2. You are not following the recommended setup procedure for initializing the UART.

  3. Running 9600 baud from a watch crystal is pretty dicey. The table indicates a maximum receive error of 44.3%.

If you do have a crystal installed, you might want to try replacing it with a 38.4KHz crystal so that you can get an exact 9600 baud rate. Otherwise, try the DCO and use the calibration values. You should be able to generate a baud rate very close to 9600.

HTH,

gm