Maker Pro
Maker Pro

RS232 to RS485 conversion problem

S

sudheervemana

Jan 1, 1970
0
HI all,

In my application board there was an converter called
CONV485-DB9 which converts rs232 data in to rs485 which is an DB9
connector at both ends.Can anyone help me to checkout the converter
whether it is working properly or not.

I had given the RS232 female end to my serial COM port and the
other end of the RS485 male connector was given to my application
board,which contains an RS485 Half duplex tranceiver.I have utilized
only 3 pins namely 2,3,5 of the RS485 connector.These signals were
given to my transceivers differntial voltage pins A and B.Does these
signals are sufficient for transmitting the data.

When i am trying to detect the baudrate of my Dsp
controller,it was getting failed.My Host PC will send some data and
receives the data from the controller.

At the time of testing my RS232 port through accesing some
software,i am able to see some data that was transmitting through the
2(tx) and 3(rx) pins of rs232 port,whereas when i am trying to see the
same data at the other end of my converter which is at the RS485 port
side,i am not able to see any voltage,Does my converter fails or else
is there anything wrong with the half duplex.Atleast i should see some
data at the rs485 port side pins.I am having two such converters,both
of them were giving the same problem.

Please give me your suggestions to solve my problem.

With Best Regards,
Sudheervemana.
 
R

Rene Tschaggelar

Jan 1, 1970
0
sudheervemana said:
HI all,

In my application board there was an converter called
CONV485-DB9 which converts rs232 data in to rs485 which is an DB9
connector at both ends.Can anyone help me to checkout the converter
whether it is working properly or not.

I had given the RS232 female end to my serial COM port and the
other end of the RS485 male connector was given to my application
board,which contains an RS485 Half duplex tranceiver.I have utilized
only 3 pins namely 2,3,5 of the RS485 connector.These signals were
given to my transceivers differntial voltage pins A and B.Does these
signals are sufficient for transmitting the data.

When i am trying to detect the baudrate of my Dsp
controller,it was getting failed.My Host PC will send some data and
receives the data from the controller.

At the time of testing my RS232 port through accesing some
software,i am able to see some data that was transmitting through the
2(tx) and 3(rx) pins of rs232 port,whereas when i am trying to see the
same data at the other end of my converter which is at the RS485 port
side,i am not able to see any voltage,Does my converter fails or else
is there anything wrong with the half duplex.Atleast i should see some
data at the rs485 port side pins.I am having two such converters,both
of them were giving the same problem.

The problem with the RS232 <-> RS485 conversion is that the direction
of the driver has to be changed. Usually on a message level.
This is not really doable with a PC when the other side is much faster.
The PC tends to use the DTR pin of the uart for the direction.
The problem ist that the direction has to be changed at the end of the
message. The end of the message is not the last Tx_Empty interrupt,
but one byte later. The Tx_Empty interrupt comes when the buffer is
empty. At that time the last byte is being shifted out. So one needs
a timer to wait for the last bit having been shifted out.
Since Bill G. mucked up the interrupt structure of the iAPX86 family,
you won't get this timer interrupt for certain at this time, but perhaps
somewhat later.
What happens when the PC switched the direction too late ?
Well, the other side may already have begun sending its stuff and
the PC misses part of it.

To debug, you need a pair of resistors in the lines that allow you
to figure the direction of the current.

Rene
 
R

Rene Tschaggelar

Jan 1, 1970
0
sudheervemana said:
HI all,

In my application board there was an converter called
CONV485-DB9 which converts rs232 data in to rs485 which is an DB9
connector at both ends.Can anyone help me to checkout the converter
whether it is working properly or not.

I had given the RS232 female end to my serial COM port and the
other end of the RS485 male connector was given to my application
board,which contains an RS485 Half duplex tranceiver.I have utilized
only 3 pins namely 2,3,5 of the RS485 connector.These signals were
given to my transceivers differntial voltage pins A and B.Does these
signals are sufficient for transmitting the data.

When i am trying to detect the baudrate of my Dsp
controller,it was getting failed.My Host PC will send some data and
receives the data from the controller.

At the time of testing my RS232 port through accesing some
software,i am able to see some data that was transmitting through the
2(tx) and 3(rx) pins of rs232 port,whereas when i am trying to see the
same data at the other end of my converter which is at the RS485 port
side,i am not able to see any voltage,Does my converter fails or else
is there anything wrong with the half duplex.Atleast i should see some
data at the rs485 port side pins.I am having two such converters,both
of them were giving the same problem.

The problem with the RS232 <-> RS485 conversion is that the direction
of the driver has to be changed. Usually on a message level.
This is not really doable with a PC when the other side is much faster.
The PC tends to use the DTR pin of the uart for the direction.
The problem ist that the direction has to be changed at the end of the
message. The end of the message is not the last Tx_Empty interrupt,
but one byte later. The Tx_Empty interrupt comes when the buffer is
empty. At that time the last byte is being shifted out. So one needs
a timer to wait for the last bit having been shifted out.
Since Bill G. mucked up the interrupt structure of the iAPX86 family,
you won't get this timer interrupt for certain at this time, but perhaps
somewhat later.
What happens when the PC switched the direction too late ?
Well, the other side may already have begun sending its stuff and
the PC misses part of it.

To debug, you need a pair of resistors in the lines that allow you
to figure the direction of the current.

Rene
 
M

Mac

Jan 1, 1970
0
HI all,

In my application board there was an converter called
CONV485-DB9 which converts rs232 data in to rs485 which is an DB9
connector at both ends.Can anyone help me to checkout the converter
whether it is working properly or not.

I had given the RS232 female end to my serial COM port and the
other end of the RS485 male connector was given to my application
board,which contains an RS485 Half duplex tranceiver.I have utilized
only 3 pins namely 2,3,5 of the RS485 connector.These signals were
given to my transceivers differntial voltage pins A and B.Does these
signals are sufficient for transmitting the data.

When i am trying to detect the baudrate of my Dsp
controller,it was getting failed.My Host PC will send some data and
receives the data from the controller.

The host PC may not be receiving data from the controller. It may just be
seeing an echo. RS485 is not full duplex.
At the time of testing my RS232 port through accesing some
software,i am able to see some data that was transmitting through the
2(tx) and 3(rx) pins of rs232 port,whereas when i am trying to see the
same data at the other end of my converter which is at the RS485 port
side,i am not able to see any voltage,Does my converter fails or else
is there anything wrong with the half duplex.Atleast i should see some
data at the rs485 port side pins.I am having two such converters,both
of them were giving the same problem.

I agree. When you transmit data out from your PC, you should see some
data at pins 2 and 3 on the RS485 side. If you are NOT seeing data on
those pins, here are my questions for you:

1) Are you sure the device is getting power? It is supposed to be
powered by the handshake lines on the RS232 side. This means that at least
one of them must be high. Maybe you could try supplying external power on
pin 8 of the RS485 side. The datasheet says anywhere between 5.1 Volts and
12 volts will do, so four aa batteries would do the trick if you don't
have a power supply. If you do have a power supply, that should work fine.
Pin 5 (on the RS485 side) is ground.

2) Technically, RS485 is differential (or at least complimentary) meaning
that you have to be careful how you probe it. So how are you probing it?
The safest way is to use a differential probe. If you don't have one, then
you can use two capacitors in series with the oscilloscope probe. This may
distort the waveform, but you will still see the edges OK. One capacitor
would be in series with the oscilloscope probe's ground connection, and
the other in series with the signal connection. In reality, I doubt
that this is any part of your problem, because I don't think the signals
are really differential. They are just complimentary.

Good luck.

--Mac
 
Top