Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Serial Support of RS-485
Author | Message | ||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
Do the serial routines support the driver-enable that is necessary for interfacing to an RS485 driver chip? In other words a "driver enable" line that is active at the beginning of the byte transmission and remains active until the conclusion of the stop bit of the transmitted byte? (Or related to this, is the call to send a serial character a "blocking call" that waits to return until the last bit is sent?) I'm guessing that with the buffering of serial communications, there is not yet support for correctly implementing the driver enable. Micromites and Maximites! - Beginning Maximite |
||||
haiqu Senior Member Joined: 30/07/2011 Location: AustraliaPosts: 152 |
RS232 to RS485 unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
I have plenty of those. I know just how they work. That isn't what I'm asking for. Micromites and Maximites! - Beginning Maximite |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
No, there is no "driver enable" line. Also, the routines that send a character do not block, they return immediately. However, perhaps you could get the same effect with: 100 PIN(xx) = 0 ' enable active low 110 PRINT #1, character$; ' send a single char on the port opened as #1 120 PAUSE 1 ' wait for the char to flush at 9600 baud 130 PIN(xx) = 1 Not very elegant but it might work Geoff Geoff Graham - http://geoffg.net |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
With all due respect: Ick. I've done that with poor results interfacing with equipment. I hate to have to dig into code and chip function to shoehorn something like this in. Micromites and Maximites! - Beginning Maximite |
||||
Xiongmao Regular Member Joined: 25/08/2011 Location: AustraliaPosts: 48 |
The usual way (for PC ports, at least) is to drive the TXen line with the RTS signal. However; not all PIC32 uart ports have an RTS wired out. Also, while its better, it's really only a slightly more sophisticated way of 'bit-banging' the enable line anyway. |
||||
Print this page |