A FLASH-based 8-bit CMOS microcontroller controls the electronic system of the buoy.  This PIC chip performed three main tasks: 

Task 1: Configure and initialize the GPS module.

Task 2: Receive and store data from the GPS module

Task 3: Transfer data to the radio modem for transmission at 30-second intervals.

These tasks were all programmed into C and then compiled and transferred with a PROM burner to the PIC chip.

Many types of information can be obtained from GPS receivers.  The buoy was only required to transmit Global Positioning System Fix Data as defined by NMEA 0183 (Standard for Interfacing Marine Electronic Devices).  All GPS data is transmitted in strings of characters that begin with the '$' character and ends with both the carriage return <CR> and line feed <LF> symbols.  These characters help to define where the string of data begins and ends.  Every type of GPS data also has a three-character code that follows the '$' character.  Global Positioning System Fix Data has the code 'GGA' and a maximum of 90 characters.  All data values are separated by commas.  Below is a string of what data GGA strings are constructed of.

A program was created to initialize the PIC and then use the PIC to configure the GPS module.  The algorithm is written below:

  1. Initialize the PIC -- set-up all options on the chip, set port pins as inputs/outputs.
  2. Set-up the PIC's software UART to send commands to GPS module.
  3. Wait for GPS module to initialize.
  4. Send command to set GPS to auto report GGA data every second.
  5. Wait for GPS module to process command.
  6. Set GPS module to communicate at 1200 baud.

The PIC's hardware UART was used to both receive data from the GPS module and transmit data to the radio modem.  The PIC was programmed to take the received GGA data and store it in an array.  Once the entire string was stored, it was output to the radio modem all at once.  The simplified algorithm is as follows:

  1. Check data received from the GPS module until the '$' is found (start of GGA string).
  2. When '$' is received, store it in the array.
  3. Continue storing characters until a <LF> is found (end of GGA string) or more than 90 characters received.
  4. Transmit the data onto the hardware UART.

In order to program the radio modem to transmit at 30-second intervals, the appropriate delay had to be added into the code.  Also, the Push To Talk (PTT) line had to be pulled high whenever transmission was required.  Therefore, Task Two's algorithm can be continued as follows:

  1. Pull PTT line high to start transmission.
  2. Wait for radio modem to synchronize.
  3. Transmit GGA data stored in the array to the radio modem for transmission.
  4. Wait for radio modem to finish transmission of entire string.
  5. Pull PTT line low to stop transmission.
  6. Wait 30 seconds before going back to Task Two's code.