Garbage reading GPS

I finally got my GPS unit in but I’m having a heck of a time getting it to connect. It is a Garmin GPS15 and has 0-3.3v CMOS serial output (two wire).

I’m using a 3100 on the prototype board and I’ve tried hooking it up to RxC/TxC on J5 and then I’ve also hooked it up to PC2/PC3 on the headers but all I typically get is garbage when I manually read the port (not even sure I’m doing that right!) I’ve tried the sample GPS application and all I get is the sample distance (LA to whatever) and then it just sits.

The GPS is running at 4800bps fixed. The datasheet on the GPS is here: http://www8.garmin.com/manuals/GPS15_TechnicalSpecification.pdf

Any help would be appreciated!

Thanks!
Kelly Koehn

Well I’ve decided to contact support on this issue. I’ve been working with some folks on the Yahoo Rabbit group with no success. However I have done some testing here on my own.

I have verified the GPS is working. I built a CMOS to RS-232 converter and hooked it up to my laptop. I am able to read the ASCII output from the GPS.

I’m suspecting that I’ve got a possible prototyping board problem as I can switch core modules out (I have a 3100 and 3110 both) and both units mimic the same problem (scrambled ascii output). I’ve switched the ports to port B and C (Rx obviously) and still receive nothing but scrambled text.

What is the likelihood that the serial port(s) on this board could be toast?

I’ll attach a copy of my code to the bottom of this. It is merely just the GPS_SAMPLE program with a small printf command to show me the raw data coming in.

Any help or advice would be appreciated… starting to get desperate here!

Thanks
Kelly

Here is a small sample of what the Rabbit gives me in STDIO:
����y��q_qYS��������������������������������������������������������������[u��
��e��e��_e�Y���}���������������������������_q������������Q��������������q_qY}�}
������������������������������������������y��q_qYS������������������������������

Here is a sample of what SHOULD be giving:
$GPRMC,012616,A,3747.8016,N,09718.3226,W,0.0,20.2,020607,5.0,E*5A
$GPGGA,012616,3747.8016,N,09718.3226,W,1,05,2.1,427.3,M,-27.0,M,74
$GPGSA,A,3,03,10,13,16,27,2.3,2.1,1.0
33

Here is the code that I’m using on the Rabbit:

#class auto

#use “gps.lib”

#define BINBUFSIZE 127
#define BOUTBUFSIZE 127

#define MAX_SENTENCE 100

// names of days of week
const char dayname[7][4] = {“Sun”,“Mon”,“Tue”,“Wed”,“Thu”,“Fri”,“Sat”};
const char monthname[12][4] = {“Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”,
“Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec”};

GPSPosition current_pos;
struct tm current_time;

void main()
{
char sentence[MAX_SENTENCE];
int input_char;
int string_pos;
char dir_string[2];

//calculate distance from known coordinates
GPSPosition la_loc, sf_loc;

la_loc.lat_degrees = 34;
la_loc.lat_minutes = 00.0;
la_loc.lat_direction = 'N';
la_loc.lon_degrees = 118;
la_loc.lon_minutes = 15.0;
la_loc.lon_direction = 'W';

sf_loc.lat_degrees = 37;
sf_loc.lat_minutes = 45.0;
sf_loc.lat_direction = 'N';
sf_loc.lon_degrees = 122;
sf_loc.lon_minutes = 27.0;
sf_loc.lon_direction = 'W';

serBopen(9600);
string_pos = 0;
dir_string[1] = 0;

//printf("SF to LA:%f km

", gps_ground_distance(&sf_loc, &la_loc));

//receive and parse GPS data
while(1)
{
	input_char = serBgetc();
  printf("%c", input_char);

	if(input_char == '\r' || input_char == '

‘)
{
sentence[string_pos] = 0; //add null
printf("%s
", sentence);
if(gps_get_position(&current_pos, sentence) == 0)
{
dir_string[0] = current_pos.lat_direction;
printf("Latitude: %d %f’ %s
",
current_pos.lat_degrees, current_pos.lat_minutes,
dir_string);
dir_string[0] = current_pos.lon_direction;
printf("Longitude: %d %f’ %s
",
current_pos.lon_degrees, current_pos.lon_minutes,
dir_string);

		}
		if(gps_get_utc(&current_time, sentence) == 0)
		{
			printf("UTC: %s %d-%s-%d %02d:%02d:%02d

",
dayname[current_time.tm_wday],
current_time.tm_mday,
monthname[current_time.tm_mon - 1],
1900 + current_time.tm_year,
current_time.tm_hour,
current_time.tm_min,
current_time.tm_sec );
}
string_pos = 0;
}
else if(input_char > 0)
{
sentence[string_pos] = input_char;
string_pos++;
if(string_pos == MAX_SENTENCE)
string_pos = 0; //reset string if too large
}
}

}

Well I’ve discovered the mystery to why reading a GPS was such a hassle… and possibly why my PWM’s quit functioning. Something on teh prototyping board has went awry. I took the core off the board and only used the voltage regulators on the board… hooking all my jumpers directly to the core… and everything works flawlessly. I can read text from the GPS, motor controllers work… just like it should.

I wonder if anyone else has experienced this kind of failure on the 3x series board…

I guess a call to the reseller and/or manufacturer is on the way…

Kelly