Shop OBEX P1 Docs P2 Docs Learn Events
RS485 network Using the SN75176 — Parallax Forums

RS485 network Using the SN75176

ROVONEROVONE Posts: 8
edited 2011-05-16 05:32 in BASIC Stamp
Dose anyone have a program that uses the SN75176 in an RS 485 Network between BS2 stamps?
The samples I found for the SN75176 chip only shows data from Master to slave.
The sample I found that showed communication for both directions uses the MAX485 chip.
I need a sample of how the master ask for data and how to setup transmit and receive periods.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-05-15 21:39
    The MAX485 and SN75176 look like they're replacements or near-replacements for one another. There may be some minor differences, but the pin-out is the same. You should be able to use the same programming examples with either one.
  • stamptrolstamptrol Posts: 1,731
    edited 2011-05-16 05:32
    The 75176 works very well in a Master-Slave set up, and I encourage that configuration as it easily allows a multi-drop arrangement, if required.

    Basically, all stations are sitting in "Receive" mode. The Master makes a request by going to "Transmit" and sending a request byte, then returning to "Receive". Based on the contents of the request byte, the Slave goes to "Transmit", sends its data, then goes back to "Receive".
    You will use one pin on each Stamp for data and one pin to switch between transmit and Receive.

    The best reference for this stuff is Jan Axelson's book "Serial Port Complete" which has several systems described in great detail.

    I will see if I can find some code from one of the projects I've done and post it.

    Cheers,
Sign In or Register to comment.