RS 485 on advantech PCM-4153 board

Hi, I have an advantech PCM-4153 board with 4 com ports. The user guide say port 2 can be configured as a RS485 port. I have a few doubts. I am using linux on this board. Will I need special drivers to use RS485 (the board uses sch3112 chip for IO) The user guide says to set a jumpe to switch from rs232 to rs485. Will I need to change the serial comm cod too? Is it OK if i do this:

1) COM 2 is configured as a serial port right now. 2) I dont change the code, just set the jumper to RS485. 3) I run the code, connect COM 2 to a RS485 to RS232 convertor, and rea in the output in using hyperterminal.

Will the above work?

Thanks...

Reply to
muktabh
Loading thread data ...

I don't know that specific board (have dealt with other PCM cards), but typically RS-485 needs some line discipline. Strictly speaking, RS-485 is half-duplex (3-wire: 2 for comms, 1 for ground); you either tx, or you rx. Not both. Something (often the RTS output) needs to enable/disable the drivers.

Again strictly speaking, the 5-wire version (full duplex) is RS-422, but the distinction is getting a bit blurred - people talk about FDX RS-485 links these days (which is mostly ok - RS-485 drivers are way more robust than RS-422 drivers). If your board has a distinct pair of RS-485 outputs and another distinct pair of inputs, you'll be fine. Otherwise, you'll need to enable the drivers while you tx (and for a short while afterwards, long enough for the last character to leave), and disable the drivers when you rx or when you're idle.

HTH,

Steve

formatting link

Reply to
Steve at fivetrees

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.