Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:09 24 Nov 2024 Privacy Policy
Jump to

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 States
Posts: 1425
Posted: 08:04pm 26 Sep 2011
Copy link to clipboard 
Print this post

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: Australia
Posts: 152
Posted: 12:33am 27 Sep 2011
Copy link to clipboard 
Print this post

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 States
Posts: 1425
Posted: 12:40am 27 Sep 2011
Copy link to clipboard 
Print this post

  haiqu said   RS232 to RS485


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: Australia
Posts: 3194
Posted: 12:47am 27 Sep 2011
Copy link to clipboard 
Print this post

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 States
Posts: 1425
Posted: 01:17am 27 Sep 2011
Copy link to clipboard 
Print this post

  Geoffg said   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


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: Australia
Posts: 48
Posted: 09:31am 27 Sep 2011
Copy link to clipboard 
Print this post

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


To reply to this topic, you need to log in.

© JAQ Software 2024