Click to See Complete Forum and Search --> : what difference of rs232 and rs485 ?
I write a program with vc++6.0, when i use rs232 for communication,
that's normal, but when i use rs485, i can write, don't read,
what wrong for this?
thanks!!!
Jörg Eckart
May 12th, 1999, 02:24 AM
Hi,
one of the differences in rs232 and rs485 is at least the voltage. The rs232 protocol specifies a voltage about -12V and 12V whereas the rs485 protocol specifies a higher voltage.
Greetings, Jörg
Jason Teagle
May 12th, 1999, 02:48 AM
RS485 needs the RTS line toggling to indicate which direction the data is flowing - to write data it has to be in one state, to read it has to be in the other.
There IS a function call which can toggle the RTS line under Windows, which will work under NT (EscapeCommFunction() ) - but it is too slow, and you will find communications erratic. You can toggle the RTS line manually using _inp() and _outp(), but this won't work under NT. You will need a device driver.
Good luck, that's something I've been grappling with. There are RS232 - RS485 converters which can automatically toggle the RTS line when they see data passing through (ADE - Auto Driver Enable) - but these are about £60 ($80) each.
Actually, if I'm not mistaken, 485 requires +5V and -5V....its a bi-directional signal. That means that when a "0" is being transmitted, one line is +5V and the other is -5V.....when a 1 is being transmitted, both lines are close to 0V.
As for why you aren't reading a signal, I've got no idea, but I'd agree that the RTS line needs to change state. I seem to think you can handle this manually, and suggest you look at the serial communications documentation.
Paul
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.