I have a depth sounder that is sending every 1 second a ASCII sentence on serial cable.
The sentence look like this: 1 0.00 0 0 0 10.1 0 0
On my mega 2560 arduino board i have a RS232 Shifter connected on pins 14, 15, 5v and GND with the following code uploaded and i try to get the data from the sounder and display it on screen but i'm not geting any data displayed even if the sounder is sending data.
Any advice is welcome, thank you.
Does the sounder use hardware flow control?
What RS232 level shifter are you using?
Sure you have the RX/TX pins the right way round?
I use the right RX/TX pins but i also switch them just to be sure... not working.
RS232 shifter is this one: SparkFun RS232 Shifter - SMD - PRT-00449 - SparkFun Electronics
Regarding the flow control... i have no ideea. The sounder is a Ohmex Sonarmite BTX
Trying to find information on ther serial spec was not easy but it is 4800,8N1 with no flow control.
Try a slightly different sketch an see if it works. You will need to alter the serial monitor baud rate to 4800
Ok with this new sketch i'm getting this:
/¨H@Ð…Ð„ÿgÊA =Õ€ø/A ~ô€€ÿ_~Bñ€€ž/²” Ð€Þ¨A~@
P Ë@PPÐ‚À€÷ !ˆ¢@/ÒÀ€õ_a/’ ñ€€Þa~°BÀ@ ü71€ e ø/A ä~ô€€ÿ_~Bñ€€ža EÇÔ€ÿ=Ý R€…Àÿ71€ @aÒ€WøJí€
~ Ê€ÿ/Ý R¾P€ýZí
Are you sure the device is set for 4800 baud rate as this looks like either a baud rate mismatch or an inverted serial signal.
Try with different baud rates and see if it comes good.