Liberty BASIC Community Forum
« Arduino can be used as a UART passthrough. »

Welcome Guest. Please Login or Register.
Jan 22nd, 2018, 12:04am

Rules|Home|Help|Search|Recent Posts|Notification

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Arduino can be used as a UART passthrough.  (Read 366 times)
Chris Iverson

member is offline


20% Cooler

Homepage PM

Gender: Male
Posts: 2293
xx Arduino can be used as a UART passthrough.
« Thread started on: Nov 16th, 2016, 10:03pm »

If you have a small device you'd like to communicate with using LB, and you have an Arduino, you can use the Arduino's built-in serial transfer capabilities to act as a USB-to-UART adapter, and communicate directly with devices using UART serial.

Found that out yesterday, when I got my CHIP device, and started playing with it. Initial configuration needed to be done, but I didn't want to mess around with my monitors, keyboards, and such to do so.

Found out that the CHIP(which runs a form of linux by default) offers a serial console over the UART pins.

I didn't have a UART, but I did have the Arduino, which I can use to communicate using COM/serial ports.

Decided to see what I could do about hooking up the pins and writing a sketch to do the transfer.

Now, the Arduino has two pins (digital 0 and 1) that are tied into the Arduino's own UART chip. It is this connection that goes to the computer while the Arduino is connected via USB, but you can also use it to communicate between Arduinos by connecting pins 0 and 1.

While researching online, I found out that, because pins 0 and 1 are wired directly into the Arduino's UART chip, it's actually possible to utilize those from the PC directly. However, the Arduino's own attempts to communicate get in the way and disrupt any communications flowing.

What you can do is prevent the Arduino's processor from booting(either by removing the chip entirely, or, far easier, connecting the RESET and GROUND pins, to lock it in pre-boot mode). In this stage, the UART chip will still work(as it's completely separate from the ATmega processor), but all of the communications to/from it will be passed straight through to pins 0 and 1.

So, three jumper cables. Connect RESET and GROUND on the Arduino, connect pin 0 to CHIP's UART-Rx pin, connect pin 1 to CHIP's UART-Tx pin, plug Arduino into computer, plug CHIP into power.

Opened up the COM port in a terminal program(mobaXterm or putty will work), and got a Linux login prompt.

Now I have another device I can play with from LB and Arduino!
User IP Logged

"Do you believe in destiny?" - Pyrrha Nikos, RWBY
"With what wish will your Soul Gem shine?" - Kyubey, Puella Magi Madoka Magica
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls