What is the resting state of RXD and TXD?

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have an Atmega2560  board which sends and receives (at 115kBauds) but Linux board and its Avrdude at the other end does not understand. 0-level from Linux board is of course 0V on the bus. But our Mega TXD is high when it is idling. I wonder could this cause problems.

Regards

Leif M

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

UART spec says idle is "1"

https://en.wikipedia.org/wiki/Un...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As Bill says, idle is '1'. RS232 is inverted, so your Linux board may be expecting RS232 levels, not TTL. You might need to add a MAX232 to the mega2560.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to connect two "bare" UARTs, OR you need to connect with two inverters.

 

The standard MAX232 type RS232 interface inverts AND changes the logic levels to +/-9V or so. RS232 is what the old PC COM port used. The standard USB serial "dongles" also produce RS232.

 

Some use logic inverter gates as "drivers" to produce what is commonly called "TTL serial". The driver protects the UART Tx and Rx from abuse from the outside, will drive longer cables, and provides one inversion. There are some USB serial dongles that produce TTL serial.

 

A bare UART Rx/Tx has no inversion. It is also logic level, like TTL serial BUT ... there is no protection, there is no inversion, and line driving capability is pretty limited.

 

Oh, by the way, standard RS232 CAN damage an unprotected UART Rx input. 

 

So, what did YOU put on your 2560 board? If your linux board has a serial port, odds are it is standard RS232. 

 

Jim

 

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And, importantly, remember TX connects to RX and RX connects to TX  (ex: PC talking to a hot dog machine)

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What Linux board? The hardware UART on an R-Pi (/dev/ttyAMA0) has 3V3 during its resting state. When the R-Pi is powered down, I don't like that it can glitch my AVR serial, so I have an IOFF buffer powered from the R-Pi 3V3 (also the buffer shifts 3V3 to 5V).

Last Edited: Mon. Jan 6, 2020 - 03:33 AM