Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - RS485

(you are viewing a thread; or go back to list of threads)

RS485 (by Geo)
hello. Can someone help me send a few characters on RS-485?
an ldmicro example ?
MAX 485 integrated circuit is connected to RX and TX pins, but pins RE and DE ?
Sun Jan 23 2011, 13:08:44
(no subject) (by Jonathan Westhues)
As far as LDmicro is concerned, it doesn't matter whether your UART is connected to an RS-232 level shifter, or an RS-485 level shifter, or something else; the software behaves exactly the same.

So just use the UART operations as usual. You can tie the MAX485's nRE and DE pins together, and connect those to a GPIO pin on the micro. When the micro pin is driven HIGH, the driver will be enabled, and the receiver will be disabled; when the micro pin is driven LOW, the driver will be disabled and the receiver will enabled. (Note that the DE pin is active-high, and the nRE pin is active-low.)

So you would generally leave that output LOW, and turn it HIGH shortly before you transmit. You would then turn it LOW again after you were done transmitting.

Note that when the receiver is disabled, its output is high-impedance. So a pull-up resistor to Vdd is necessary on that output; otherwise, the node ends up floating, and the micro may receive garbage due to noise.

(You also could leave the receiver enabled at all times, and switch just the driver. That would all still work, except that you'd receive all the traffic on the bus, including the characters that you transmit yourself.)
Sun Jan 23 2011, 13:44:10
help me (by meiyazhakan)
hi sir pic 16f876 iam using.so u send how to connect lcd and how to change integer value with keypad send wiring also
thank you sir
Tue Jun 25 2013, 03:14:33, download attachment RPM_counter.ld
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):