November 21, 2024, 10:52:05 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


SIO to TX/RX Adapter Circuit

Started by JonnyMac, January 13, 2014, 01:43:37 PM

Previous topic - Next topic

JonnyMac

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/




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.
Jon McPhalen
EFX-TEK Hollywood Office

bsnut

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.
William Stefan
The Basic Stamp Nut

JonnyMac

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
Jon McPhalen
EFX-TEK Hollywood Office

bsnut

So, looking at the schematic the TX and the RX lines and what you are saying, they are connected to the Arduino pins.
William Stefan
The Basic Stamp Nut

JonnyMac

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).
Jon McPhalen
EFX-TEK Hollywood Office