beautypg.com

Using the usb communication port, Communication on the pc side, Section 8 – Pololu Orangutan SVP User Manual

Page 27

background image

8. Using the USB Communication Port

The Orangutan SVP’s USB Connection provides a virtual serial port called the Pololu Orangutan SVP USB
Communication Port
which allows two-way communication between a personal computer and the Orangutan
SVP’s AVR at a rate of over 20 kilobytes per second.

The bytes sent from the computer will be transmitted to the Orangutan SVP’s auxiliary processor and made
available to the AVR. Bytes sent by the AVR will be sent to the computer. In addition to this two-way data
communication, you can use the RTS and DTR handshaking lines. The state of these lines (either 0 or 1) is
controlled by the computer and can be read by the AVR. Several standard terminal programs set the DTR line to
1 when they connect to a serial port, and then set it to 0 when they disconnect. Therefore the DTR line can be
used to determine whether a terminal program is connected to the Orangutan, and make the Orangutan’s behavior
dependent on that.

On the PC side, the Orangutan SVP’s USB drivers make the USB Communication port look like a standard serial
port to the operating system, allowing you to use existing terminal programs and software designed to use serial
ports. On the AVR side, the Pololu AVR C/C++ Library provides serial communication functions for using the
port.

Communication on the PC side

To use the USB Communication Port, 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 Orangutan SVP USB Communication Port entry. The port name will be at the end
of this line in parentheses (e.g. “COM3”). In Windows, a given device will always be associated with the same
port unless you manually change its port assignment in the Device Manager (see

Section 5.a

).

Windows Vista device manager showing the Pololu Orangutan SVP.

To determine the port name in Linux, type

ls /dev/ttyACM*

. The port name will be one of the devices listed

there. If there are only three ports, then the USB Communication Port will be /dev/ttyACM1 (the programmer
will be /dev/ttyACM0 and the TTL serial port will be /dev/ttyACM2). If you see more than three ports, then you
should look at the output from

dmesg

when you plug in the Orangutan SVP to see which three ports are created;

Pololu Orangutan SVP User's Guide

© 2001–2012 Pololu Corporation

8. Using the USB Communication Port

Page 27 of 37