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 moduleTask 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:
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:
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: