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.
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.
(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) If this is in fact the case, I would recommend using a different device. Bus contention on a 485 multidrop should be expected and for it to "damage" the part is unacceptable.
Thank you all for your help. I have realized RS485 communication.
TO PROTECT THE DRIVER I PUT ALSO 2 RESISTOR (10 OHM) IN SERIES TO SIGNAL A AND B NEAR CONNECTOR. ALSO 2 SUPPRESSOR (TRANSIL AND/OR VARISTORS 30V D=7) FROM A AND B TO METAL CASE PROTECT THE BOARD AND MICROPROCESSOR FROM EMC BURST. IS IMPORTANT ALSO A 3° WIRE WITH 100 OHM TO CONNECT ALL BOARDS GROUND IN THE CASE OF GALVANIC ISOLATION. THE COMMON MODE VOLTAGE AT A AND B CAN DAMAGE DRIVER (SEE DATA SHEET). YOU CAN EVALUATE ALSO MAX485 FROM MAXIM THAT IS MORE PROTECTED.
DON'T SHOUT!
TO PROTECT THE DRIVER I PUT ALSO 2 RESISTOR (10 OHM) IN SERIES TO SIGNAL A AND B NEAR CONNECTOR Please get a new keyboard where the caps lock is not stuck. The two 10 ohm resistors will, indeed, protect the chip but create havoc with the terminations. a much better idea is to use a chip that can handle the load such as The LT1785/LT1791 from linear technology http://www.linear.com/pc/productDetail.do?navId=H0,C1,C1007,C1017,P1713 which can, in adiition to surges, withstand a constant + or - 60 volts on the A and B in/outputs. Our "wonderful" costomers like to put 28 Volts on the signal lines and these chips can handle it!. One word of caution: If you want this to be totally survivable, you need to up the wattage of your terminating resistors. Erik