This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RS485 communication with 8051

My Friends
Merry Christmas and Happy New year.
Would you give me an example about how to connect SN75179 chip or equivalent to realize RS485 communication?
I can realize communication between two AT89S52 directly using RXD and TXD, but when I inserted a couple SN75179 chips (every one connected with 120 0hm resistor) they died.
What are the possible reasons?

Thank you.

Parents
  • You can use SN75176 for RS485 that is half duplex multipoint serial bus.
    Connect:
    Pin P3.0 (rx) to pin 1 of SN75176
    Pin P3.1 (tx) to pin 4 of SN75176
    Pin P3.4 (or other pin) to a NOT gate. Connect the output of NOT to pins 2 and 3 of SN75176 (NOT is for because on poweron the microprocessor pin is High and the driver is in TX mode and a bus conflict can damage the driver).
    Pullup with 100K pin 6 (A signal) and pulldown with 100K pin 7 (B signal) to define the bus when no device is in tx mode.
    Connect a load of 120 ohm only at the ends of the net to avoid reflection of cable.

    Because RS485 is a half duplex you have to use a software protocol that activate only one driver in TX mode (put pin P3.4 low only during the time of TX).
    Normally the MASTER send a bytes packet to all SLAVE (with UART in mode 2 or 3 and SM2 ON only for the first byte). All slave are in serial interrupt because of SM2 but only SLAVE addressed remain into the interrupt and replay to master. The other slaves are not disturbed by the communication.

Reply
  • You can use SN75176 for RS485 that is half duplex multipoint serial bus.
    Connect:
    Pin P3.0 (rx) to pin 1 of SN75176
    Pin P3.1 (tx) to pin 4 of SN75176
    Pin P3.4 (or other pin) to a NOT gate. Connect the output of NOT to pins 2 and 3 of SN75176 (NOT is for because on poweron the microprocessor pin is High and the driver is in TX mode and a bus conflict can damage the driver).
    Pullup with 100K pin 6 (A signal) and pulldown with 100K pin 7 (B signal) to define the bus when no device is in tx mode.
    Connect a load of 120 ohm only at the ends of the net to avoid reflection of cable.

    Because RS485 is a half duplex you have to use a software protocol that activate only one driver in TX mode (put pin P3.4 low only during the time of TX).
    Normally the MASTER send a bytes packet to all SLAVE (with UART in mode 2 or 3 and SM2 ON only for the first byte). All slave are in serial interrupt because of SM2 but only SLAVE addressed remain into the interrupt and replay to master. The other slaves are not disturbed by the communication.

Children