GPS-E-2 By John Hansen, W2FS This software is available only for non-commercial amateur radio or educational applications. All other uses are prohibited. This software may be modified only if the resulting code be made available publicly and the original author given credit. Contact the author for information on commercial licenses. (c) Copyright 1999, John A. Hansen. All rights reserved. GPS-E-2 is a microphone encoder package written for the TAPR PIC-E. It was written in C and compiled with the CCS PCM compiler, version 2.237. I have heard that some of the timing routines in later versions of the compiler were changed (made more accurate) so if you compile with a different version of PCM, you might need to alter the two statements that read: delay_us(860); to a value other than 860. The source code is included in this file as gpse.c, gpse.h and picparms.h. You do not need to have a C compiler to use this code, however. I have also included a Win95/Win98/WinNT program, GPS-E-2.exe, that will allow you to customize the code and will also program the PIC for you using the programming port on the PIC-E. Setting Up the PIC-E This firmware is based on the concept of using two completely separate APRS configurations that will be available to the user at all times. The MODE switch on the PIC-E is used for switching between them. Pushing that switch to the left will enable “configuration 1” while pushing it to the right will enable “configuration 2”. There is a center position on the switch that was supplied with the first beta versions of the PIC-E. Make sure you don’t leave the switch in the center position. Within each of the two configurations, the user can also enable “auto” or “manual” mode. The auto mode transmits an APRS packet at a fixed time interval (user settable). The “manual” mode transmits only when the user lets up on the mic. It does not do this after every transmission, but only at the user-specified interval, which is set in the software. The “Option” switch sets the auto/manual mode. Push it to the left to enable auto mode and to the right to enable manual mode. Do not leave it in the middle. Also, to use my firmware, you must set the Jumper J5 to the SW2 position, to make the mode switch operational Using the Configuration Software To use the configuration software GPS-E-2, simply make sure that the GPS-E-2 program and the file GPSE.HEX are in the same subdirectory. Then run the program and fill in the blanks. Most of the blanks are pretty self-explanatory. Toward the bottom of the screen is a pair of radio buttons that allows you to specify whether you are entering information for configuration 1 or 2. Enter all the data you want for both configurations before programming the chip. To program the chip, first remove JP4 on the PIC-E board. Hook the PIC-E programming port to a serial port of your computer using a very short serial cable (mine is about 9 inches long). Make sure you select the serial port on the GPS-E-2 screen that you will be using for programming (COM1 through COM8). MAKE SURE THAT POWER IS NOT APPLIED TO THE PIC-E WHEN YOU ARE PROGRAMMING IT. Push the Program PIC button. After 15-30 seconds you should get a message that the chip was programmed successfully, or that programming failed. The programming software has been tested with the following machine configurations and found to work: 486DX2 – 50 (laptop) running Win95 75 MHz Pentium running Win95 233 MHz Pentium running Win95 200 MHz Pentium Pro running Win98 450 MHz Pentium II (Xeon) running WinNt 4.0 However, it has also been tested with a few computers and found not to work. It seems to not work well with AMD processors, for example (and there is no truth to the rumor that this is simply because I own Intel stock!). It also has sometimes had problems with Celeron processors. If you have trouble programming, one possible fix is to replace resistor R1 with a 1N914/1N4148 diode with the stripe positioned on the PIC side. The raises the programming voltage somewhat. My unit, which was tested with the above computers, had this option installed. Realizing that there are some computers that this programming software will just not work with at all, I have also included an option to write out the modified HEX file. This file can then be uploaded to the chip using PIX, or PicProg, or any other programming software that you might have. The button in the bottom center of the screen allows you to write the modified HEX file, which will be named OUTPUT.HEX. After you have successfully programmed the chip, reinstall JP 4, hook up a radio and a GPS unit, and apply power to the unit. You should see the VALID light flash once. If you don’t see the valid light flash, it means that the chip is not programmed successfully (sometimes this happens even when the program reports successful programming). If the auto/man switch is in the auto position, and if data is being received from the GPS unit, and the ACTIVE light is not on (signaling channel activity) your unit should then transmit its first packet. You can tell this is happening because the red PTT light will come on. If you have any questions or comments send them to the author, John Hansen, W2FS at the following e-mail address: John@hansen.net Revised version A: 4/13/99 1. Fixed the problem of it transmitting lower case letters for destination (caused a problem with some TNC's). 2. Made small change in timing parameters. Revised version B: 6/16/99 1. Changed number of flags at the end of a packet from 1 to 2... this solved the problem of KPC-3's not being able to copy the data. 2. Changed the default icon to a car from a bicycle. Revised version C: 6/23/99 1. Fixed a couple of path problems including SSID's other than zero not functioning and paths shorter than 3 digi's not functioning. Also you can now successfully enter SSID's greater than 9. Revised version E: 9/30/99 1. Solved the problem of false reports when longitude was less than 10 degrees. 2. Fixed problem with the "slow" variable. 3. Fixed intermittent problem with inaccurate reports due to occasional failure to grab the RMC sentence. Revised version F: 12/19/99 1. Really did solve the problem with longitude less than 10 degrees this time! Revised version G: 4/9/00 2. Fixed problem in the GUI program (GPS-E-2.EXE) that caused configuration 2 to not work properly.