GPS NMEA antenna aiming tracker.

Thread Starter

camerart

Joined Feb 25, 2013
3,840
hi,
Are you able to transfer test data between your two PC's via the converters.?
Check that you have set up the USB/RS converters correctly.??

E
Hi E,

I have two separate Putty screens connected by two USB to serial converters, and typing into one shows on the other, and visa versa.

Either of these USB to serial converters connected directly to the PIC RX Pin 26 +GND, shows nothing, nor does connecting the GPS directly to the pin +GND. (Keyboard is working ok and shows on LCD)

Next programming the PIC with another compiler and programmer.

Cheers, Camerart.
 

ericgibbs

Joined Jan 29, 2010
21,459
Hi E,

I have two USB to serial converters, one is RS232 3.3V and the other is TTL 5V neither work with or without the MAX232.

C.
What Baud rate is the USB/RS232 PC output set to.? also what is the Baud rate of the GPS.?

Also is the Putty set to, 1 start bit, 8 data bits. 1 stop bit.?

Which version of the program are you testing with.?

E
 

ericgibbs

Joined Jan 29, 2010
21,459
hi,
Use this PIC UART transmit only test program,

Connect the PIC to a RS232/USB converter, use a level shifter, MAX232 IF required.

It will transmit from the PIC to to the PC this text 'Test Data String' at 200mS rate, let me know if the Putty can read it to your PC screen.

E
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,840
What Baud rate is the USB/RS232 PC output set to.? also what is the Baud rate of the GPS.?

Also is the Putty set to, 1 start bit, 8 data bits. 1 stop bit.?

Which version of the program are you testing with.?

E
Hi E,

I'm pretty sure the GPS baud rate is 9600, so I've tried to set all settings the same. I've also tried all of the rates from 50 to 23500.

How do I set the PC to output 9600 baud rate?

Putty is set to 9600, 8 data bits, 1 stop bit. I don't see a start bit?

I've been using the last program you sent to me, after I corrected the comments, but no changes the the actual program. (CamPad_Uart1V-1 B.bas)

C.
 

ericgibbs

Joined Jan 29, 2010
21,459
I've been using the last program you sent to me, after I corrected the comments, but no changes the the actual program. (CamPad_Uart1V-1 B.bas)
OK,
Please try that Uart Only program I have just posted, see if the PIC can talk to your PC using Putty etc.
E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,840
hi,
Use this PIC UART transmit only test program,

Connect the PIC to a RS232/USB converter, use a level shifter, MAX232 IF required.

It will transmit from the PIC to to the PC this text 'Test Data String' at 200mS rate, let me know if the Putty can read it to your PC screen.

E
Hi E,

That's an interesting question!

So far I've been under the misconception that I only needed the RX connection, but after adding a connection to the TX pin, this now shows 'Test Data String' down the Putty screen.


EDIT: This is with the 'Test Data String' program as you most likely guessed.

C
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,840
Hi E,

With the 'CamPad_Uart1V-1 B.bas' program, the keyboard is working ok.

Then connect Putty.

If left, 11111111111s appear on the LCD. If a section of text is copied and pasted into Putty, it shows on the LCD, sometimes.

If left the screen fills up with 11111s.

C
 

ericgibbs

Joined Jan 29, 2010
21,459
hi,
The test of the PIC's TX output shows that the Baud rate is OK, also the fact you can sometimes transmit valid data from the PC to the PIC's LCD.

I cannot explain the '1111111111's at this time.???

What is the data string that 'sometimes' gets displayed OK.?

E
 

ericgibbs

Joined Jan 29, 2010
21,459
hi,
I have modified this program to ONLY check the PIC's UART RX receive operation and send the received data to the LCD.
No keypad etc.....

Enter a test message on your PC and use Putty to send it to the PIC, make sure that you have the CR and LF at the end of the test string.

E
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,840
hi,
I have modified this program to ONLY check the PIC's UART RX receive operation and send the received data to the LCD.
No keypad etc.....

Enter a test message on your PC and use Putty to send it to the PIC, make sure that you have the CR and LF at the end of the test string.

E
Hi E,

With 'RX2LCD1.bas' prog.

Same results as before. Sometimes there are a few 11111s sometimes a full screen of 111111111s.

Copy and paste into Putty: sometimes the TXT comes on the screen, but most times the Serial adaptor flashes, and nothing on the screen.

C.
 

ericgibbs

Joined Jan 29, 2010
21,459
hi,
There is no reason in that test program why you should get '11111's??

Are the voltage levels on the RS232 lines OK.?

Its important that you send CRLF's codes at the end of all strings
E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,840
hi,
There is no reason in that test program why you should get '11111's??

Are the voltage levels on the RS232 lines OK.?

Its important that you send CRLF's codes at the end of all strings
E
Hi E,

I have disconnected the USB converter and 11111111s and 0000000s are all over the screen.

With the 'CamPad_Uart1V-1 B.bas' the keyboard now doesn't work. With 1s and 0s. (two separate PICs.)

I'll investigate!.

C.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,840
Hi E,

The 1111s was a keypad problem!!!

The 'UartOnlyTest1.hex' program gives 'Test Data String' on Putty screen.

The 'RX2LCD1.bas' program gives 'Rdy!' on LCD

The 'CamPad_Uart1V-1 B.hex' program gives '!' on LCD If '$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47' is pasted into Putty, nothing appears on LCD or Putty screen. I did paste random text into putty and '$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47' plus random text appears on both screens. I tried again and nothing appears.

C
 

ericgibbs

Joined Jan 29, 2010
21,459
hi C,
Are you sure that when you paste the GPS string onto Putty that the end of message string has a CR and LF code? , the program looking for the LF code.

E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,840
hi C,
Are you sure that when you paste the GPS string onto Putty that the end of message string has a CR and LF code? , the program looking for the LF code.

E
Hi E,

I added a ? to each bit of text and it's working. I didn't understand the CR LF code? bit.

So am I correct that each section of text needs a $ at the front and a ? at the end?

C.
 

ericgibbs

Joined Jan 29, 2010
21,459
Hi E,

I added a ? to each bit of text and it's working. I didn't understand the CR LF code? bit.

So am I correct that each section of text needs a $ at the front and a ? at the end?

C.
hi C,
If you recall, when using the Oshonsoft IDE we could not easily add directly to the end of a STRING the CRLF code with the Hardware UART tool, so we made the EOS [end of string] code a '?' which we could type at the end of a test string.

So the code the program looks for in SIMULATION as the EOS is a '?' and not LF [0x0A].
Its commented in the program that when using an external RS232 input you must change the '?' to a 0x0A.

The '$' at the start of the string is required, both in simulation and in a real PIC, as this determines the start of a GPS message.
E
 
Top