Pololu USB AVR Manual do Utilizador Página 43

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 42
PuTTY is a free Windows terminal program that can send and receive bytes on a
serial port.
If you need to send and receive non-ASCII bytes, you can use the Pololu Serial Transmitter Utility for Windows
[http://www.pololu.com/docs/0J23].
You can also write a computer program to use the serial port. The freely available Microsoft .NET framework contains
a SerialPort class that makes it easy to read and write bytes from a serial port. Here is some example C# .NET code
that uses a serial port:
// 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();
// Transmit two bytes on the TX line: 1, 2
port.Write(new byte[]{1, 2}, 0, 2);
// Wait for a byte to be received on the RX line.
int response = port.ReadByte();
// Show the user what byte was received.
MessageBox.Show("Received byte: " + response);
// Disconnect from the port so that other programs can use it.
port.Close();
6.a. Communicating via the Serial Control Lines
Firmware version 1.04 (released on April 29th, 2011) fixes a problem with the RTS and DTR control signal
outputs. If you want to use those outputs, you should upgrade your firmware to version 1.04. Please see
Section 9 for information about upgrading your firmware.
Firmware version 1.03 (released on December 22nd, 2010) inverts the TTL serial port’s control signals
so that 0 V corresponds to 1 and 5 V corresponds to 0, making it consistent with other USB-to-TTL-
serial adapters. Prior to version 1.03, the opposite convention was used.
In addition to transmitting bytes on the TX line and receiving bytes on the RX line, the USB-to-TTL-serial adapter
can use programmer pins A and B as serial handshaking lines of your choosing. Each pin can be configured as an
Pololu USB AVR Programmer User's Guide © 2001–2014 Pololu Corporation
6. Communicating via the USB-to-TTL-Serial Adapter Page 43 of 54
Vista de página 42
1 2 ... 38 39 40 41 42 43 44 45 46 47 48 ... 53 54

Comentários a estes Manuais

Sem comentários