Serial port is being injected

Hello,

While I have only dabbled in playing with my RCM4400W here and there, this problem baffles me.

I’ve been trying to get a GPS module attached to the 4400W proto board and all I was getting was garbage until I decided to try removing the GPS module from the board to check if there was a bad connection some where when I found this!

50i$.7�>Z�namicC Universal Rabbit BIOS Version 10.50i$.7�>Z�namicC Universal Rab
bit BIOS Version 10.50i$.7�>Z�namicC Universal Rabbit BIOS Version 10.50i$.7�>Z�
namicC Universal Rabbit BIOS Version 10.50i$.7�>Z�namicC Universal Rabbit BIOS V
ersion 10.50i$.7�>Z�namicC Universal Rabbit BIOS Version 10.50i$.7�>Z�namicC Uni
versal Rabbit BIOS Version 10.50i$.7�>Z�namicC Universal Rabbit BIOS Version 10.

I have no clue as to why this is being injected into my serial port. I have checked both C and D and I get the same output.

The code I’m using is this:

#define CINBUFSIZE 127
#define COUTBUFSIZE 127
main()
{
   char gpsout;
   serCopen(4800);
   serCrdFlush();
   while(1)
   {
   	gpsout = serCgetc();
             printf("%s", gpsout);
   }

}

As you can see nothing fancy, I was just trying to see the ASCII output.

Any thoughts?

Thanks in advance,

Yar

What you are seeing is not being “injected” into your serial port.
You defined char gpsout, yet in your printf you specify you will provide a string.
So typically gpsout has a value between 0 and 255, and the printf is printing the data in you program memory between adress 0 and 255, which is the Dynamic C initialization string you are seeing. Change your program as follows :

printf(“%c”, gpsout);

Edit - You still wont get what you want with this change, since you dont have the necessary control code to wait while the next character is transmitted on the serial bus, so typically I would guess you would see repeating characters with this code. Implementing the wait code I leave to you.