| ??? 08/09/00 13:06 Read: times |
#4267 - RE: RS-485 emulation from PC using RS-232 |
Quoting from AsyncPro's help:
[in half duplex] "Since both RS-485 wires are required to transmit data, an RS-485 device can either receive data or transmit data (but not both) at any given moment. RS-485 devices usually spend most of their time in receive mode, monitoring the line for incoming data. When one device starts transmitting all other devices in the network receive that data, so messages usually include an address byte to allow devices to ignore messages not addressed to them. With such a network, the PC normally acts as a master - addressing and sending data to each remote slave device and processing its response before moving on to the next device. Before the PC can transmit, it must take control of the data line. While transmitting, it cannot receive any data - so it must release control of the line after transmitting so it can receive the response. This switch from transmit to receive mode can be either automatic (controlled by the RS-485 board or converter), or it can be manual (controlled by the PC software or driver). The mechanism provided by RS-485 boards for switching the data line from receive to transmit mode falls into three categories: · RTS Control · Automatic · Other Most currently available RS-485 boards use the RTS line to control the state of the data line. Before transmitting data, the application raises the RTS line of the port, which tells the RS-485 board to switch to transmit mode. After transmitting the data the application lowers RTS to switch the line back to receive mode. These boards are supported by the TApdComport by using the RS485Mode property (with some exceptions noted below)." So, when you xmit, rts goes high *until* it ends the transmission, then rts goes low. About WinNT/Win95: "Under Windows 3.1 and Windows 95, the waiting is handled within Async Professional since the communications API doesn't provide the necessary accuracy. Under Windows NT, the waiting is handled by the serial port driver, since it does provide the necessary accuracy." The problem I had was that my RTS lines timing was good, but the signal level was inverted, ie: when it should drop it raises. But as i've played with DDK (device driver kit) and my WinNT isn't in it's 'default' configuration i could not check who is the guilty (but my serial driver is in trial). To solve this i've added a simple inversor after the max232 and before the rs485 driver. And worked. I'm using Async ver 3.02 on WinNT 4 If you're looking for soft way to do 9bit scheme as Peter and Steve posted (you guys rock) maybe this can help you further: http://www.ednmag.com/ednmag/re.../18di5.htm http://www.ednmag.com/ednmag/re...#Implement a nine My personal opinion is that any pc-based 9bit scheme should run as a driver (in ring 0) and copy the micro's design (only pass to the program's interrupt routine when the adress match) This way you achieve a huge flexibility in your system. []'s |
| Topic | Author | Date |
| RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
| RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 | |
RE: RS-485 emulation from PC using RS-232 | 01/01/70 00:00 |



