There are 8 messages in this thread.
You are currently looking at messages 0 to 8.
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.
<b...@coolgroups.com> wrote in message news:1...@i42g2000cwa.googlegroups.com... > 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. In reference to what? >
b...@coolgroups.com wrote: > 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. 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
Chris wrote: > b...@coolgroups.com wrote: > > 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. > > 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 Flipping the two wires does not work. That also flips the start bits, stop bits, and parity bits, which messes everything up.
On 13 Oct 2006 22:44:09 -0700, b...@coolgroups.com wrote: > >Chris wrote: >> b...@coolgroups.com wrote: >> > 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. >> >> 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 > >Flipping the two wires does not work. That also flips the start bits, >stop bits, and parity bits, which messes everything up. 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
<b...@coolgroups.com> wrote in message news:1...@e3g2000cwe.googlegroups.com... > > Chris wrote: > > b...@coolgroups.com wrote: > > > 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. > > > > 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 > > Flipping the two wires does not work. That also flips the start bits, > stop bits, and parity bits, which messes everything up. > 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
b...@coolgroups.com wrote: > Chris wrote: > > b...@coolgroups.com wrote: > > > 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. > > > > 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 > > Flipping the two wires does not work. That also flips the start bits, > stop bits, and parity bits, which messes everything up. 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
b...@coolgroups.com wrote: > 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. > 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