Pololu Simple User Manual

Page 57

Advertising
background image

The voltage on the RX pin should not go below 0 V and should not exceed 5 V.

The Simple Motor Controller provides logic-level (0 to 3.3 V) serial output on its serial transmit line, TX. The bytes
sent by the motor controller on TX are typically responses to commands that request information, but they can also
be data received by the TXIN pin and passed on. If you aren’t interested in receiving TTL serial bytes from the motor
controller, you can leave the TX line disconnected. See

Section 4.2

for more information on connecting a serial device

to the Simple Motor Controller.

The serial interface is asynchronous, meaning that the sender and receiver are separately configured ahead of time
to agree on the length of a bit (this is known as the “baud rate” and it is usually specified in bits per second, or
bps), and each side independently times the serial bits. The Simple Motor Controller has the ability to automatically
detect the baud rate, which means that it can be used even when the baud rate of the serial source is unknown as
long as the serial source initiates communication by sending the proper baud rate indication byte: 0xAA (written as
170 in decimal notation). The Simple Motor Controller works with baud rates from 1200 to 500,000 bits per second.
Asynchronous TTL serial is available as hardware modules called “UARTs” on many microcontrollers, but it can also
be “bit-banged” by a standard digital output line under software control.

The data format is 8 data bits, no parity bit, and one stop bit, which is often expressed as 8-N-1. The diagram below
depicts a typical asynchronous, non-inverted TTL serial byte:

Diagram of a non-inverted TTL serial byte.

A non-inverted TTL serial line has a default (non-active) state of high. A transmitted byte begins with a single low
“start bit”, followed by the bits of the byte, least-significant bit (LSB) first. Logical ones are transmitted as high
(3.3 V) and logical zeros are transmitted as low (0 V), which is why this format is referred to as “non-inverted” serial.
The byte is terminated by a “stop bit”, which is the line going high for at least one bit time. The Simple Motor
Controller supports fixed baud rates of 1099 bps to 2 Mbps and can automatically detect baud rates up to 500 kbps in
auto-detect baud rate mode.

You must wait for at least 1 ms after the Simple Motor Controller powers up or is reset before you start sending data.
Anything sent during this first millisecond is likely to be ignored or incorrectly received.

Whenever connecting devices, remember to wire the grounds together, and ensure that each device
is properly powered. Unpowered devices with a TTL serial port can turn on or partially on, drawing
power from the serial line, which means that extra care must be taken when turning power off and on
to reset the devices.

Pololu Simple Motor Controller User's Guide

© 2001–2014 Pololu Corporation

6. Using the Serial Interface

Page 57 of 101

Advertising