Pololu Simple Manual de usuario Pagina 56

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 101
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 55
6. Using the Serial Interface
The Simple Motor Controller has two serial interfaces that allow you to send commands and receive responses from
the controller. The commands and responses are represented as a series of bytes [http://simple.wikipedia.org/wiki/Byte].
Serial commands let you set the speed of the motor when the Input Mode is Serial/USB. In any Input Mode, serial
commands let you request information about the motor controllers state and monitor the RC and Analog channel
inputs. The serial commands can come from a TTL serial source, such as a microcontroller, transmitted to the motor
controllers RX pin, or they can come via USB transmitted to the controllers virtual COM port. The Simple Motor
Controller treats the two command sources independently and can simultaneously process commands from both
sources.
The Simple Motor Controller can also be controlled using its native USB interface (see Section 7).
COM Port
The Simple Motor Controller installs as two devices, one of which is a virtual serial (COM) command port (see
Section 3.1 for driver installation instructions). You can identify the COM port number by looking in your computers
Device Manager:
Windows Vista or Windows 7 device manager showing a Simple Motor Controller.
In Linux, the COM port name will be something like /dev/ttyACM0. In Mac OS X 10.7 or later the COM port name
will be something like /dev/cu.usbmodemfa121.
You can use a terminal program or computer software to send commands to this virtual serial port over USB. Most
common programming languages have libraries for sending serial data (e.g. Visual C# has a SerialPort class), which
makes it easy to write a custom computer program to control the Simple Motor Controller. See Section 6.7 for code
examples. The baud rate settings do not matter when communicating through the virtual COM port.
TTL Serial
The Simple Motor Controllers serial receive line, RX, can receive bytes from a TTL serial source, such as a
microcontroller, which allows for integration into embedded systems. The RX line expects a logic-level (0 to 2–5 V,
or “TTL”), non-inverted serial signal.
Pololu Simple Motor Controller User's Guide © 2001–2014 Pololu Corporation
6. Using the Serial Interface Page 56 of 101
Vista de pagina 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 100 101

Comentarios a estos manuales

Sin comentarios