Main Site Documentation

Single Wire UART


I am reading a data sheet which says that the device supports a single wire UART. On the block diagram

It has SWIOP and SWION but what does that mean? That sounds like there are 2 wires needed (GND is a given).

( pg. 11


Section 5.3 P20.


Yea, I got that part. (This driver is epic btw). Is there a video or wiki article that I can look at, which describes Single Wire UART? Does the G120 even support that configuration? the driver says that it has to send TxD to HiZ to receive data.

Also, the driver automatically figures out the baud rate! How cool is that!


Just connect the SWIOP pin to both TX and RX on the micro. From 1.2.2:

The single wire interface allows differential operation similar to RS485 (using SWIOP and SWION) or single wire interfacing (leaving open SWION). It can be driven by any standard UART.

So just connecting SWIOP to both is the plan. They do talk about using a pullup to 1/2 VDD for SWION on 3v3 systems.


That won’t work as the TX from the micro will be a driven output so that the TX from the device won’t be able to drive the line. You need to use an open collector driver for this with a pull-up. RX can be connected direct and you just handle the TX reflected data in software.


The Open collector driver would just be a Shockley diode right?


(Ok Xnay on the Shockley diode). I’m going to conclude that this is RS-485. They could have just said that, and saved me hours of research. :frowning:

EDIT: Actually, it looks suspiciously like ModBusRTU.


It’s not the same. Modbus RTU has no sync byte and doesn’t use 8 bit register address.