Hardware Reference
In-Depth Information
Figure 2-6
FTDI USB-to-TTL cable. In addition to the transmit, receive,
voltage, and ground connections, it also has connections for
hardware flow control, labeled Request to Send (RTS) and Clear
to Send (CTS). Some devices use this to manage the flow of serial
data.
FTDI
USB-to-TTL Serial Cable
GND
CTS
Black
Brown
Ground
Clear-to-send
Provides voltage output
when plugged into USB port
Vcc
TX
Red
Orange
Yellow
To microcontroller RX
To microcontroller TX
RX
RTS
Request-to-send
Green
Using an Arduino As a USB-to-Serial Adapter
Arduino boards have a built-in USB-to-serial adapter so that
the microcontroller can communicate with your personal
computer serially. The USB-to-Serial adapter's transmit
pin (TX) is attached to the microcontroller's receive pin
(RX), and vice versa. This means you can bypass the micro-
controller and use the Arduino board as a USB-to-Serial
adapter. There are times when this is handy, like when you
want to communicate directly with the Bluetooth radios
you'll see later in this chapter. To do this, either remove the
microcontroller carefully, or put a sketch on it that does
nothing, like so:
Then connect the desired external serial device as follows:
External serial device's receive pin Pin 0 of the Arduino
board
External serial device's transmit pin Pin 1 of the Arduino
board
Now your serial device will communicate directly with the
USB-to-Serial adapter on the Arduino, and the microcon-
troller will be bypassed. When you're ready to use the micro-
controller again, just disconnect the external serial device
and upload a new sketch.
void setup() {}
void loop() {}
Search WWH ::




Custom Search