Pins A and B can be identified with serial handshaking lines using the Pololu USB AVR Programmer
Configuration Utility.
After your have associated pins
A
and/or
B
with serial handshaking lines, you can take
advantage of the I/O capabilities of
A
and
B
by either using a terminal program that supports
control signals (such as
[http://braypp.googlepages.com/terminal]
) or by writing
a computer program.
The Microsoft .NET framework is free to use and it contains a
SerialPort
class that makes it
easy to read and write bytes from a serial port as well as set and read the control signals.
Here is some example C# .NET code that uses a serial port in this way:
// Choose the port name and the baud rate.
System.IO.Ports.SerialPort port = new System.IO.Ports.SerialPort("COM4", 115200);
// Connect to the port.
port.Open();
// Assuming that line A is identified with RTS, this drives line A high (5 V).
port.RtsEnable = true;
// Assuming that line B is identified with DSR, this takes a digital reading of line B.
if (port.DsrHolding)
{
MessageBox.Show("Line B is high.");
}
else
{
MessageBox.Show("Line B is low.");
}
// Disconnect from the port so that other programs can use it.
port.Close();
Pololu USB AVR Programmer User's Guide
© 2001–2010 Pololu Corporation
5. Communicating via the USB-to-TTL-Serial Adapter
Page 27 of 36