Shop OBEX P1 Docs P2 Docs Learn Events
RS485'like on Propeller — Parallax Forums

RS485'like on Propeller

peterzpeterz Posts: 59
edited 2007-01-03 12:44 in General Discussion
I have to implement communication with a RS485'like bus and my Propeller.
The bus is not exactly RS485, I mean, one of the 2·wires is tied to GND.
The Propeller would act as the master, that is to say, no one in the bus would send·a packet that is not demanded by the master itself. Typoically the remaining controllers in the bus send an answer when the main controller sends a request.
Note tha communication is always half-duplex.

Most Rs485 circuits I have seen use an external·tristate gate to open and close·the controller RX/TX lines to the bus, and·they use·two separate· I/O pins for RX and TX.·However,·would it be possible to achieve a similar effect using only·one I/O pin on the propeller and change the direction from OUT to IN and back ? I mean, setting it to OUT when writing and immediately setting it to IN for reading, with no external tristate. If so,·a pull up resistor on the bus would be necessary ?

Just trying to keep things as simple as possible.:-)

·

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2007-01-03 12:44
    Unless you need 'real' rs485 to interface with industry standard outside equipment, theres nothing stopping you from developing your own standard and protocol to get the job done. The way you've described it would work fine.

    Having said that, rs-485 uses a pair of wires that change polarity relative to each other in order that the comm signals not have to be referenced to ground. In electrically noisy environments, it gives better noise immunity. That gives the '485 distance inprovement over '232.

    Even though you're talking Propeller, have a look at the help file for the BS2 SERIN/SEROUT command. You'll note that that the stamp can do a multidrop serial connection very similar to whay you are describing. The Propeller may havea similar facility.

    For what its worth, the 75176 chip gives a very easy way to implement real '485. Uses a couple of processor pins but gives rock solid communication on long lead lengths.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
Sign In or Register to comment.