RS422 inverted

I am reading RS422 data into a computer. However, the data is only correct if I flip the bits (one's complement). Any ideas why?

I looked on an oscilloscope, and it looks like the ones are high and the zeros low.

Reply to
bob
Loading thread data ...

In reference to what?

>
Reply to
Dana

OK. Common problem. Common solution -- flip the two wires. Happens all the time with twisted pairs. A and B reversed is by far the most common setup problem with RS422 and RS485.

Good luck Chris

Reply to
Chris

Flipping the two wires does not work. That also flips the start bits, stop bits, and parity bits, which messes everything up.

Reply to
bob

That would seem to indicate that the hardware is okay and that you have a software problem, either with what you load into the transmit holding buffer or with a configuration bit instructing the UART how to handle the byte that's loaded into the outgoing buffer. What does the data look like upstream of the '422 line driver?

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb

You'll have to add a harware inverter somewhere. RS485 is not RS232 and the RS485 data can be in any format that appeals to you. The UART in Micros such as PICs etc, expect RS232 format input, which means the static, line-idle, inactive, no data, level at the UART input pin is logic 1, ie +5V. A RS232 'start' bit then drops the pin to 0V. The UART making the assumption that the RS232 data has been inverted whilst coming off of the comms cable. john

--
Posted via a free Usenet account from http://www.teranews.com
Reply to
john jardine

OK. Bob. Please describe the hardware you're using on both sides. Also, did this work before, or is it a new setup?

Any additional information would be helpful, the more the better.

Thanks Chris

Reply to
Chris

yup, thats normal.. it makes it easy for you to use a level Inverter. you can drive the computer with the level of voltage needed and invert it as you go.

--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.