receiving RS_232 TTL with Arduino UNO or Nano

Good day ,
I have to receive an RS_232 at TTL level using Arduino Uno or Arduino Nano.
I saw that the RX and TX lines ( D0 and D1 ) are directly connected to the USB converter.
How could I do that in both HW and SW ?
Thanks for helping,
Regards,
Ambrogio
IW2FVO

Can D0 and D1 of the Arduino board be used to interface the rs_232 at TTL level ?
Note that those pins go to the TTL to USB converter on Arduino board .
If the USB plug is not connected to the Arduino, does the USB converter go to Tristate ? ( this will avoid conflict with the rs_232 TTL).
Thanks for helping .
Regards,
Ambrogio

iw2fvo wrote:

I have to receive an RS_232 at TTL level

The two are totally different electrical specifications, please research RS-232 to gain further understanding.

Also wrote:

Can D0 and D1 of the Arduino board be used to interface the rs_232 at TTL level

No, you can not simply connect a RS-232 communications device to an Arduino by connecting some wires, if that is what you are asking.

There is no such thing as RS-232 TTL, the two terms do not mix, though there ae many out there with confused ideas and notions about it, through lack of understanding of what each is and means exactly.

If you are asking how to connect a RS-232 signal to your Arduino, then you will need a converter that will take the RS-232 signal and convert that to TTL levels.

If you plug a device outputing a RS-232 signal directly into your Arduino, you will likely destroy all or part of your Arduino.

RS-232 is a unbalanced bi-polar voltage based transmission, traditionally using voltage swings of -12v to +12v with respect to the ground or zero volt reference pin. RS-232 is asynchronous communications, us start bit(s), data bits and stop bit(s) at a specific baud rate.

When we talk about TTL serial in the common term, we are again talking of asynchronous communications, with start bit(s), data bits and stop bit(s) at a specific baud rate but at voltage levels of TTL, being typically 0 to 5Vdc.

TTL never goes below zero volts.

Apart from this, I really do not understand what you are asking or wanting do as you are not clear in what you say.


Paul

Thanks Paul for your answer.
I did express my problem in a bad way.
I have a microcontroller that has a serial RX and TX TTL interface ( 0 and 5 Vdc ) coded as 9600 baud 8N1.
I would like to interface such a controller to my Arduino Uno board or to my Arduino Nano board.
I would directly connect those RX and TX signal to the Arduino D0 and D1: can I do that or there will be a conflict with the USB converter located in the Arduino board ? Should I leave the USB connector unplugged ?
Thanks
Regards,
Ambrogio

Good day,
Any answer to my last message please ?
Please : any help ?
Thanks
Ambrgio

Hi
Providing level conversion is available at both "ends" then exchange should be easy just connect
Rx to Tx and Tx to Rx, ensure baud rates etc are matched and send your data.

Should you not have 232/ttl hardware in place then use either a max232 or ftdi level converter the choice is yours.

The usb connection may be left in place and used for serial monitoring/debugging.

Essef :8)

Thanks,
RX and TX on Arduino board are connected to D0 and D1 and are connected to the onboard USB interface chip too.
So there are three device connected at the same time . > do you see any problem ?
Thanks
Ambrgoio

IMG.pdf (211 KB)

Double posted.

Essef :8)

Should,nt be a problem
Because the UNOs serial transfer is handled by a mega16 which is the window to and from the terminal software and also the mega328p tx/rx pins so in fact if you include your external Mcu you have only 2 connections.

Essef :8)

iw2fvo:
RX and TX on Arduino board are connected to D0 and D1 and are connected to the onboard USB interface chip too.
So there are three device connected at the same time . > do you see any problem ?

As long as your not using the hardware serial port (D0/D1) to talk to both the PC and the microcontroller you should be fine. If you need to talk to both then use the software serial for the MCU and the hardware serial for the PC.

As Riva says, as long as you do not have the Arduino communicating to a computer via USB, you should be fine.

iw2fvo wrote:

I have a microcontroller that has a serial RX and TX TTL interface ( 0 and 5 Vdc ) coded as 9600 baud 8N1.
I would like to interface such a controller to my Arduino Uno board or to my Arduino Nano board.

If I understand you correctly, you have a micro-controller board, brand X with TTL level async port, with TTL being 5 volt logic and wanting to connect that to your Arduino TTL level async port, then yes, all you need do is swap over the Tx and Rx lines, so that Tx on one board goes to Rx on the other.

Just make sure that both boards do in fact use 5 volt logic at those pins, and not one at 3v3 and another at 5V.

ESSEF wrote:

Should you not have 232/ttl hardware in place /snip

Again, there is no such thing as 232/ttl or 232TTL or TTL232, and saying so will only confuse the heck out of people already struggling with the concepts of asynchronous communications.

I'll say again, RS-232 is an electrical specification only, and traditionally uses ±12Volt swing on the transmit line. This contrasts to TTL, which never ever goes below 0 volts, and traditionally is a 0 to 5 volts swing.


Paul

Here,s the linkto an imaginary Rs232/TTL level converter.

Essef :8)
Ps they do exist, ask Santa or better still Google !

Of course there are TTL to RS-232 converters, that has well been the case since the 1970's, when all we had were 1488 and 1489 chips. MAX232 hadn't been designed yet.

When you say TTL/232 hardware without saying and qualifying as you just did, that you actually mean a level converter, then it can only make it harder for people who don't know of terms, such as what TTL or RS-232 is specifically.

There many folks out there who do think there is such a thing they call 232TTL or TTL232 and similar, and call it a protocol or a specification, when none such thing actually exists.

What they are meaning is asynchronous serial communications at TTL level.

Ambrgoio, has all that we have written helped, do you need any further advice?


Paul

Thanks to all of you.
I really have an asynchronous serial communications at TTL level 9600 / 8 /N /1 that electrically interface with Arduino D0 an D1 pins. It is compliant.
I was just a little bit warried about the possibility that the USB chip ( that is on Arduino board ) could get in conflict with my external MCU: as I told before there are Three devices connected together. ( 328, USB chip and ext MCU ). This could be avoided if the serial USB is not used on my sketch. Am I OK ?
Thanks
Ambrogio

Ambrogio wrote:

Am I OK ?

Yes, D0 and D1 are there to be used for the exact reason you want.
You asked a very good question.


Paul

I know that this is an old thread, but I totally understand what iw2fvo is asking, so I thought I would join in. In the case of the nano, the schematic (https://www.arduino.cc/en/uploads/Main/ArduinoNano30Schematic.pdf) show a serial route of TTL -> RS232 -> USB, with the USB available for serial Tx/Rx and the D0/D1 pair also available (albeit at TTL level), and it appears that there could be a conflict where, for example, an incoming TTL signal on D0 wants to be at level 1 and the corresponding signal from the FTDI chip wants to be at level 0. I also wondered about this eg what is the default (resting) level of the FTDI without any USB activity, and how can you square the fact that the serial library sends and receives to both USB and TTL. Looking at the circuit, however, shows 2 1K series resistors, RP1B and RP1C which allow for different voltages from these 2 sources. What this means, unfortunately, is that, although the Arduino can transmit to both USB and a TTL device at the same time, with no ill effect, if a TTL input from a serial device (like for example a 4D systems touch screen) is connected, it will have priority over the USB, because the TTL input in connected directly to the ATMEGA and the signal from the FTDI will be ignored. Not a problem in most cases, since the TTL device can be plugged in after the upload, but be aware that you cannot debug the s/w by simulating the external device via the USB serial monitor as an input unless you disconnect the incoming signal from D0 first.

RedWinterUK:
thanks a lot for the reply,
all the best.
Ambrogio