SN75176 RS485 Communications between two Arduinos

Previously, I wrote about RS485 communications between two Arduinos using a MAX485 IC. The link for that post is HERE.  It showed one Arduino as a tranmitter and the other as a receiver. This post is very similar, however, I am using a different IC, the SN75176BP. This post is about SN75176 RS485 communications between two Arduinos which allows either one to transmit and receive at the same time.

The SN75176 IC is also an RS485 transceiver like the MAX485 however it is full duplex where as the MAX485 is only half duplex. Full duplex allows sending and receiving at the same time.

Here is the pin layout for the SN75176BP IC which I am using:

SN75176 RS485 Transceiver






This chart shows the function of each pin of the SN75176:

RO | 1      8 | Vcc
RE | 2      7 | B
DE | 3      6 | A
DI | 4      5 | Gnd

RO  - Receiver out
RE  - Receiver enable (enabled when this pin is LOW)
DE  - Driver   enable (enabled when this pin is HIGH)
DI  - Driver   in (the transmitter pin)
GND - Ground (0V)
A   - Connect to pin A of the other 485 IC
B   - Connect to pin B of the other 485 IC
Vcc - Power (Vcc)

Using two Arduinos, each with an SN75176BP, we can establish two way communications:

Serial / USB <-> Arduino <-> SN75176  (RS485) <-> SN75175 (RS485) <-> Arduino <-> Serial / USB
SN75176 RS485 Communications between two Arduinos

SN75176 RS485 Communications between two Arduinos

The Fritzing diagram source is HERE in case you would like to modify it.  Note that the RE (Receiver Enable) pin is wired permanently low. The DE (Driver Enable) pin is turned on (high) only when data is sent.

The Arduino UNO that is used here only has one serial device, so the software serial library is used to add another serial device on pins 8 and 9. The software serial port is used to communicate (via RS232) to the SN75176 and the built in serial port (via USB) is used to communicate (via RS232) with the host computer the Arduino is attached to.

Load the following code into each  Arduino:

Arduino Sketch to allow RS232/RS485 communications
via two Arduinos with attached SN75176 ICs.


#include <SoftwareSerial.h>

SoftwareSerial mySerial(8, 9); // RX, TX
#define DE 7

void setup(){

void loop() {
  if (mySerial.available()) Serial.write(;
  if (Serial.available()) {

Attach a serial connection to each Arduino and data can be sent back and forth thru the  connection between the two SN75176 ICs.  Use my handy updated Python serial communications program for that purpose:

#!/bin/env python
#Python Serial Communications Script

import serial,sys,glob,select

def scan_ports(pat):
  scan = glob.glob(pat)
  if (len(scan) == 0): return("")
  else:                return(scan[0])

serport = ""
rate    = "115200"

if (len(sys.argv) > 1):
 l = len(sys.argv) - 1
   if (sys.argv[l][0] == '/'): serport = sys.argv[l]
   else:                       rate    = sys.argv[l]
   l = l - 1

if (serport == ""): serport = scan_ports("/dev/ttyACM*")
if (serport == ""): serport = scan_ports("/dev/ttyUSB*")
if (serport == ""):
  print("Unable to find any ports scanning for /dev/[ttyACM*|ttyUSB*]") 

ser = serial.Serial(port=serport,baudrate=rate,parity=serial.PARITY_NONE,stopbits=serial.STOPBITS_ONE,bytesize=serial.EIGHTBITS,timeout=1)

print("connected to: ",ser.portstr," ",ser)

while True:
    tr = ser.inWaiting()
    if tr > 0:
#     for x in line: print (x.encode('hex'),end='')
  except KeyboardInterrupt:
  while sys.stdin in[sys.stdin], [], [], 0)[0]:
#   line = sys.stdin.readline()
#   for x in line: print (x.encode('hex'),end='')
#   print


Once this is working, you have a ‘prototype’ to emulate other equipment or use ‘half’ (one Arduino and one SN75176) to attach to other devices using the RS485 interface such as Modbus RTU.


    • Ricardo Albuquerque on October 31, 2022 at 11:58 am
    • Reply

    You said that the SN75176BP is a full duplex. However, the description of the product here (

    says it’s a half duplex. Could you please explain why there’s a difference between your post and the product description?

Leave a Reply

Your email address will not be published.