5. Communicating via the USB-to-TTL-Serial Adapter
One bonus feature of the Pololu USB AVR programmer is the USB-to-TTL-serial adapter,
which can be used for connecting microcontroller projects to a personal computer. The
programmer’s drivers make the USB-to-TTL-serial adapter look like a standard serial port
to the operating system, allowing you to use existing terminal programs and software
that are designed to use serial ports. This feature is similar to the
[http://www.pololu.com/catalog/product/391]
product, except the programmer has fewer
control lines available and transmits at 5 V.
The
TX
and
RX
lines of the programmer are used to send asynchronous serial
communication. When the programmer receives a byte from the computer via USB, it will
transmit that byte on the
TX
line. When the programmer receives a byte on the
RX
input
line, it will send that byte back to the computer via USB.
The bytes are sent and received eight bits at a time, with no parity and one stop bit. This
coding is sometimes abbreviated 8N1. The bits must be
non-inverted
, meaning that a zero is
sent as low voltage, and a one is sent as high voltage. All devices involved in asynchronous
serial communication need to agree ahead of time on the duration of one bit (the baud rate),
so all devices must be independently configured to run at the same baud rate before they
will be able to communicate with each other. The USB AVR programmer supports all integer
baud rates from 110 to 115200 bits per second. The following figure is an example of an 8N1
TTL serial byte:
To use the USB-to-TTL-serial adapter, you must first determine what port name the
operating system has assigned it.
To determine the port name in Microsoft Windows, open the Device Manager, expand the
“Ports (COM & LPT)” list, and look for the “Pololu USB AVR Programmer TTL Serial Port”
entry. The port name will be at the end of this line in parentheses (e.g. “COM4”). In
Windows, a given device will always be associated with the same port unless you manually
change its port assignment (see
).
Pololu USB AVR Programmer User's Guide
© 2001–2010 Pololu Corporation
5. Communicating via the USB-to-TTL-Serial Adapter
Page 24 of 36