EFX-TEK

TEK Talk => I/O Support => Topic started by: JonnyMac on January 13, 2014, 01:43:37 PM

Title: SIO to TX/RX Adapter Circuit
Post by: JonnyMac on January 13, 2014, 01:43:37 PM
It can be tricky connecting our 1-wire serial devices to microcontrollers (like the Arduino) that use two pins for serial (due to hardware UART in device). I found this post on Hackaday.com that may be useful. When time allows, I will build it up and give it a try with our products.

http://hackaday.com/2014/01/13/software-half-duplex-uart-for-avrs/

(http://hackadaycom.files.wordpress.com/2014/01/1wireserial.png?w=352&h=280)


In the diagram the pin called TX/RX would be the SIO pin of the EFX-TEK device. Remember that ground must be common to both devices.
Title: Re: SIO to TX/RX Adapter Circuit
Post by: bsnut on January 13, 2014, 06:41:01 PM
Good find Jon 8). This is a cool way of doing half duplex serial communication with micros such as the Basic Stamp where you need a TX line and a RX line. The only thing that the schematic doesn't show is what number of the NPN transistor and the number of the diode. I am wondering if the transistor and diode can be general purpose since they're not marked.
Title: Re: SIO to TX/RX Adapter Circuit
Post by: JonnyMac on January 13, 2014, 06:53:46 PM
The BASIC Stamp can do half-duplex on one pin, the Arduino cannot (without twisting itself into a pretzel). We get a lot of Arduino users that want to try our IO boards and this just may be the ticket.

I'm sure the parts are general purpose:

D1: 1N4148
Q1: 2N3904
Title: Re: SIO to TX/RX Adapter Circuit
Post by: bsnut on January 13, 2014, 08:06:13 PM
So, looking at the schematic the TX and the RX lines and what you are saying, they are connected to the Arduino pins.
Title: Re: SIO to TX/RX Adapter Circuit
Post by: JonnyMac on January 13, 2014, 09:17:23 PM
Yes, or any other micro that uses a hardware UART with fixed TX and RX pins. The circuit counts on the TX idle state being high (true mode).