RS422 with Atmega128

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

Hello all,

I have been looking for information on how to interface atmega128 with RS422.

I know RS232 and have worked with it, But only have an idea about what is RS422.

Can anyone pls tell me how to interface atmega128 to have the RS422 feature. If you have a schematic it would be really helpful.
thnx
cal

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

Cross post in General Electronics forum.

gtpats, don't do that !

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

yup... deleted the cross post sorry!

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

422 is just a different electrical connection than 232. 232 is +-10v, 422 is differential 5v. MAXIM-IC makes 232, 422 and 485 chips.

Imagecraft compiler user

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

I use 2 RS485 driver chips, one as receiver and one as transmitter. Many RS485 chips comply with both RS422 and RS485 standard.

Think of it as RS232 with balanced transmit and receive lines. Make sure that you can turn off the transmit chip if you will be using more that 2 devices on the buss. And also make provision for line biasing resistors even if not used.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

gtpats wrote:
I know RS232 and have worked with it, But only have an idea about what is RS422.

http://en.wikipedia.org/wiki/RS-422

As stated in the wikipedia article, EIA-422/V.11 does not allow multiple drivers but only multiple receivers. So most RS422 systems only have one single Tx sender and multiple Rx receivers. RS232 can also do this one way connection, except RS422 has better noise immunity from the differential wire pairs and is actually designed to support multiple Rx receivers. If you want multiple Tx senders you probably wanted RS485.

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

Quote:
does not allow multiple drivers but only multiple receivers.
I think Wikipedia is wrong. You can only have 1 master with RS422 (unlike RS485 where each node can be a master) but many slaves (up to 255?? depending on the drivers used).

So the master sends on the transmit line, the slaves send on the mater's receive line when asked to. ie they turn their transmitters chip on, send requested data and turn off transmitter allowing other slaves to communicate with the master if polled. Perhaps that's what they mean by

Quote:
EIA-422 cannot implement a truly multi-point communications network (such as with EIA-485), however one driver can be connected to up to ten receivers.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

js wrote:
I think Wikipedia is wrong.
Well, not wanting to pay lots of money for a current copies of all the specifications, I cannot say for sure or not if Wikipedia is wrong in this case. However, the article referenced different versions of the RS422 specification and in fact the single Tx line driver single direction model is the only RS422 I'm familiar with. A specification that allows bidirectional communication on a common general purpose bus does not really care about master/slave issues unless that bus specification has dedicated multi-master arbitration in its bus hardware. Master/slave/multi-master becomes an implementation detail on RS485. Because RS485 is bidirectional, the specification has to take multi-master data collisions at the transceiver hardware level into account.

If RS422 was ever bidirectional (?), it appears possible that RS485 replaced it which would explain why EIA-422/V.11 is not bidirectional. There are commercial applications that have a single dedicated bus talker (Tx node) connected to many Rx only nodes. Since the costs of bus transceiver hardware has gone way down from the old days when these specification were first created, I would tend to ignore RS422 in favor of RS485 unless there was some specific compatibility issue involved.

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

I'm working at the moment with a 3rd party device that uses RS422 with 1 TX pair and 1 RX pair, so I would consider it bidirectional even though, technically, it could be considered 2 unidirectional links. I have always thought of RS422 as what Maxims calls in the following pic, full duplex RS485, which I don't believe is actually correct as RS485 uses only 1 pair.

So in this case I would consider the driver on the LH side as the master and all others as slaves as only the driver on the LH side can talk to all others, whilst the "slaves" can only talk to the master when polled. But it may all be in the definitions.

Attachment(s): 

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Thank you very much for all the replies guys,
i will start acquiring more knowledge about it.

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

Gents, I've seen the 'full duplex' RS485 referred to as '4 wire RS485' on a few pieces of equipment from different manufacturers. As Mike implies, the only way to settle the argument is to get the standards, but I'm not going to fork out the dollars! I did have an argument regarding this topic on another forum where the other person was going on about the 'RS485 standard', but he didn't have the standard nor could quote the date of the standard he was referring to. My position was that there was widespread reference to '4 wire RS485' and that was what i was referring to. Whether it is or isn't kosher is up for question.

I got caught out complaining to an equipment manufacturer that their documentation didn't comply to the Modbus specification - seems the specification changed over time....