Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Simulating NMEA data

Status
Not open for further replies.

camerart

Well-Known Member
Hi,

I have a 18F4520 set up to read NMEA data, and show the result of a calculation, and works ok with a GPS module sending once/second. Obviously I am only getting one reading, as the GPS is stationary.

I need to check GPS movement, and have tried copying NMEA paragraphs (Paragraph = a second burst of sentences) and sending them to the PIC with a Teraterm macro/FTDI, sending paragraphs once/second. This is not working.

Both DATA signals are approx 3V, the FTDI can be changed to 5V.

I'm considering a MAX232.

Any ideas?

Camerart.
 
The FT232R supports High Current IOs with this option, the UART IO pins will drive out at 12 mA instead of their normal 4 mA.
If you select external Osc and have none, it won't work.

All Rs232 input thresholds are 2 diode drops or 1.3V

The IO ports on the 18F4520 are set at 20% of Vdd, so a higher voltage for Vcc does little.
(5V gives no advantage )

So check your clock and data polarity and levels.
 
Last edited:
Both DATA signals are approx 3V, the FTDI can be changed to 5V.
If your pic is running at 5V I suggest a divider to send... I use a 1k / 2k2 to drop the 5V to 3.3V on the tx line

However... If you are just sending MNEA data Then the pic should read a 3V pulse fine... I use a compass that spits out MNEA sentences.. I have a small VB6 program that allows me to rotate and simulate a 360 degree motion... It works via the USB and the very same FT232r TTL setup as you... The only difference is I use a pic18f45k20..
 
The FT232R supports High Current IOs with this option, the UART IO pins will drive out at 12 mA instead of their normal 4 mA.
If you select external Osc and have none, it won't work.

All Rs232 input thresholds are 2 diode drops or 1.3V

The IO ports on the 18F4520 are set at 20% of Vdd, so a higher voltage for Vcc does little.
(5V gives no advantage )

So check your clock and data polarity and levels.

Hi Tony, Thanks for your answer, can you clarify a couple of things please?

Does FT232R mean FTDI programmer?
"this option" Does this mean the 3v or 5v jumper?

If I've tried the 5v option, could that mean that I have used 12mA instead of 4mA and burnt the input pins out?

Camerart.
 
If your pic is running at 5V I suggest a divider to send... I use a 1k / 2k2 to drop the 5V to 3.3V on the tx line

However... If you are just sending MNEA data Then the pic should read a 3V pulse fine... I use a compass that spits out MNEA sentences.. I have a small VB6 program that allows me to rotate and simulate a 360 degree motion... It works via the USB and the very same FT232r TTL setup as you... The only difference is I use a pic18f45k20..
Thanks Ian,

If I set the FTDI to 3.3V does this satisfy your first line? "If your pic is running at 5V I suggest a divider to send... I use a 1k / 2k2 to drop the 5V to 3.3V on the tx line"

Could the difference between 18'F'4520 and 'K' make any difference?

We appear to have similar set-ups. Does your compass spit out bunches of different NMEA sentences in 'say' 1/sec batches? Do you simulate these bunches or do you just send the required NMEA sentence in 1/sec intervals? Which terminal do you use, I use Teraterm?

Camerart.
 
Could the difference between 18'F'4520 and 'K' make any difference?
No... I run at 5v anyway...
Do you simulate these bunches or do you just send the required NMEA sentence in 1/sec intervals? Which terminal do you use, I use Teraterm?

My compass spits out this "$HCHDG,xxxxx.x"
So I lock onto the decimal place and work back until the comma... I only need 1 degree presision


Funny enough... My first compass used Oshonsoft and a pic16f877a to retrieve the data and displayed it on a 2x16 display

I cannot post it here as it is still a current product!!!
 
No... I run at 5v anyway...


My compass spits out this "$HCHDG,xxxxx.x"
So I lock onto the decimal place and work back until the comma... I only need 1 degree presision


Funny enough... My first compass used Oshonsoft and a pic16f877a to retrieve the data and displayed it on a 2x16 display

I cannot post it here as it is still a current product!!!

Hi,

Do you simulate data into your PIC or only use the Compass as input? If so which Terminal do you use to send data to the PIC?
 
3V can usually drive 5V logic but needs series R to limit input current to 3mA for the ESD/SCR diode rail clamps for accepting 5V into 3V chip.
Thresholds are less than 50% for this reason and others.

But I think maybe it is more basic. Did you cross Tx. Rx? both pins should be high.
50e1ce8bce395fb62b000000.png



for TTL High is idle with low as startbit. and for RS232 it is inverted to positive logic..
 
good stuff.

If it was just a smart term you needed, in the old BBS days.... we used Mustang Software's QModem which support Autolearning scripts, and user generated interactive scripts with x,y, and z modem protocol at any speed using DOS.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top