-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic Issue #55
Comments
Example simply reads NMEA0183 data from one port (Serial3) and writes to main port. It works with any device having at least main port and one extra serial port. It may also work by using software serial port. NMEA0183 port is defined on line: As mentioned on NMEA0183.h, Begin(...) is actually obsolete and you should instead use Open(). Unfortunately this has not been updated to example. With Open() setup would be:
|
Hi @ttlappalainen |
Are you feeding RS232 or RS422? In RS232 signal levels changes +- around ground so you need some tranceiver chip. If you feed RS422, you need also tranceiver chip like MAX3488. |
I am feeding compass signal to this shield. |
Why you are taking 12-24 TD_A and TD_B to shield. Shouldn't you use NMEA0183 TD_A/TD_B? The shield must be configured as RS422 so that there is separate TX/RX. If it is configured RS485, it uses same wires for TX/RX. |
Also check that A/B has not been mixed. I have met devices using A/B marking, but actually they has to be crossed to tranceiver. |
They both are same. Why i am using 12V side because i connected a connector that is also powering the compass. |
I tested the old code and it worked fine with proper hw. I also updated and tested PrintNMEA.ino. You can uncomment line:
Then code works also with Arduino Uno. If you still do not get anything out, you need to check your hw, wireing, baudrate you use on serial monitor, baudrate your device uses etc. |
You may have:
|
1:Wrong pins on host side Now what i noticed that if i display serial port data without parsing then it shows garbage data on serial monitor continues. It seems like something to do with Parsing. Thanks for all your cooperation |
As I wrote: "I tested the old code and it worked fine with proper hw." Garbage sound like different baud rate definition. Check also that baudrate on your serial monitor matches with Serial.begin(9600); |
In your second picture you are feeding data to pin 3, but on code definition that is define as tx pin instead of rx pin. Also on NMEA0183 code Serial baud rate has been set to 9600. On you working example you have 38400. So which baudrate you use on serial monitor 38400 or 9600? If you use 38400, you have to also have Serial.begin(38400); |
Yes, Arduino TX will be module RX and vice versa. |
Sorry, you were right. |
Yes it worked. |
My original list: you need to check your hw, wireing, baudrate you use on serial monitor, baudrate your device uses etc. |
I actually found the reason. It is wrong printing on module board. |
Wrong printing? Are you sure? You are effectively creating one DTE/DCE imagine all your modules in one box which then has a serial interface. Tx and Rx refer to that external interface not to inter module connections. Get Outlook for Android
|
No; you misunderstand. It depends on whether the device is DTE or DCE. On the example you posted above of the module with the DB9 connector on the Tx and Rx refer to the direction on the DB9 not the in/out direction on the side facing the MCU. The in/out direction will be opposite to your logic, in this case. I attach a quick drawing to help explain.. But TLDR Rx connects to Rx and Tx to Tx.
…________________________________
From: alikhan968 ***@***.***>
Sent: Thursday, 11 January 2024 9:59 am
To: ttlappalainen/NMEA0183 ***@***.***>
Cc: Littlechay ***@***.***>; Comment ***@***.***>
Subject: Re: [ttlappalainen/NMEA0183] Basic Issue (Issue #55)
Yes i am sure. the printing is supposed to be for this board but not for external wiring.
If it says RX then TX external wire should connect with this pin.
This is the standard.
For example FTDI board.
image.png (view on web)<https://github.com/ttlappalainen/NMEA0183/assets/81488667/ef8b3550-eaad-40e0-b55f-16c853b2e0ed>
—
Reply to this email directly, view it on GitHub<#55 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFHSMUCPASFXBK24665WEIDYN36LJAVCNFSM6AAAAABAWSTMXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBVG4ZDEMBSGE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Got it. |
Hi,
You did a great job.
I have very basic questions if you can answer plz.
I have Arduino UNO and MEGA.
Can it work on both boards?
I simply want to print the data of a compass to serial monitor.
I am using this shield
https://projecthub.arduino.cc/hwhardsoft/how-to-use-nmea-0183-with-arduino-49055a
I am using printNMEA example,
It is giving me this header issue no such file or director. #include <StandardCplusplus.h>
If i comment it then everything fine.
2nd, i believe this example are based on hardware serial port 3 of mega.
I tried but no data show up.
I need 4800 baud rate to receive data.
Thanks
The text was updated successfully, but these errors were encountered: