MAX232 and FTDI and Arduino

Hy

I got a problem with a MAX232.
So I got a circuit that is decoding a FSK signal and converting it with a MAX232 so that I can read
it with a Serial Monitor Programm on a PC.
For my Laptop I use a Serial to USB cable to hook it up to an USB port:

This works without a problem.

So now I would like to use the Signal coming from the MAX232 directly with an Arduino. This should be possible by just connection it
to the UART (Pin 0) to receive the Signal. However I do receive something with my Arduino UNO but with the Arduino Mega the port is silent.
With the UNO a lot (all) of the bytes get lost or are corrupted so you can't read the signal it is strange.

The same is true when I use a FTDI Basic Breakout board from Sparkfun. I can read the Signal with my computer but it is not usable for further decoding.

So why is this do I need some filters? Why is it working with the Serial to USB cable?

Thx for your Help,
Andy

Maybe the buffer of ONE UART not have size enought to data sent.
I testing shiftOut examples when try put more that 30 chars on Arduino IDE Serial monitor same chars have lost.
If I understand, Arduino.cc Serial.Avalaible() the size of receive buffer is 128bytes

The buffer those fill up quite fast in 3 seconds 128byte are full however
since it does not work with the Sparkfun Break out board it must be something different....

Thx
Andy

With the UNO a lot (all) of the bytes get lost or are corrupted so you can't read the signal it is strange.

When someone says something like this, it usually means the baudrates are not set the same on
all devices.

hmm ok so is their a terminal program where I can choose baud rates that are not exact as the known one?
But why is the Serial to USB cable working?

Thx
Andy

EVERY terminal emulator program allows you to set baudrate, including the Serial Monitor in the
Arduino IDE. When you connected the GUC232A [which I happen to have too], you needed to
select comport and baudrate values.

In your Arduino sketch, you need to setup the serial port

void setup()
{
  Serial.begin(9600);
}

or proper baudrate to match the PC end.

but since I probably need to use a 2621 baud rate and not 2400 I can't set that with my terminal programs eg. zoc, hterm, x-ctu
Yes with the Arduino it might be possible but since I like to test it first with the Sparkfun Break out board I need another
terminal program.

Still no one could answer me why the Serial to USB cable mentioned does work and the Sparkfun don't...

Thx
Andy

So now I would like to use the Signal coming from the MAX232 directly with an Arduino. This should be possible by just connection it to the UART (Pin 0) to receive the Signal.

a) The -+12v levels will probably blow up the Arduino
b) The data is inverted with RS232

Why is it working with the Serial to USB cable?

Because that adaptor appears to be designed for RS232, the Arduino is not.


Rob

Ok thx for the answer.
So maybe something like this would help?
http://www.cutedigi.com/pub/Arduino/arduino_RS232.pdf

Yep, or DIY with a MAX232/202.


Rob

I think Graynomad is right, I was confused about your hookup. You cannot connect
+/-12V out of a MAX232 directly to the Arduino. But even if you use a second MAX232
to convert back to 0-5V, you still cannot connect that signal to pin 0 [RX] on the
Arduino header, as then the signal will interfere with the USB port on the UNO board.

I will change way.
I told with my friend and maybe new versions of AVR libs have problems with communication serial and Arduino MEGA,
Today we have communications OK with UNO, but only can communicate with Mega using a old linux instalation on my friend computer, that have old versions of AVR libs.

yes, finally got it working, thx for all your help!!!! Great now I can work on the code :slight_smile:

Thx to all of you!!!
Andy

What are do you to work fine?