Pololu Qik 2s9v1 Manuel d'utilisateur Page 14

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 24
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 13
Pololu Protocol:
This protocol is compatible with the serial protocol used by our other serial motor and servo controllers. As such,
you can daisy-chain a qik on a single serial line along with our other serial controllers (including additional qiks)
and, using this protocol, send commands specifically to the desired qik without confusing the other devices on the
line.
The Pololu protocol is to transmit 0xAA (170 in decimal) as the first (command) byte, followed by a device-
number data byte. The default device number for the qik is 9, but this is a configuration parameter you can change.
Any qik on the line whose device number matches the specified device number will accept the command that
follows; all other Pololu devices will ignore the command. The remaining bytes in the command packet are the
same as the compact protocol command packet you would send, with one key difference: the compact protocol
command byte is now a data byte for the command 0xAA and hence must have its most significant bit cleared.
Therefore, the command packet is:
0xAA, device # byte, command byte with MSB cleared, any necessary data bytes
For example, if we want to set motor M1 to full speed forward for a qik with device number 9, we could send the
following byte sequence:
in hex: 0xAA, 0x09, 0x0D, 0x7F
in decimal: 170, 9, 13, 127
Note that 0x0D is the command 0x8D with its most significant bit cleared. Since all compact-protocol command
bytes start with 0x8n, these bytes will all turn into data bytes 0x0n.
The qik will respond to both the Pololu and Compact protocols on the fly; you do not need to use a jumper or
configuration parameter to identify which protocol you will be using.
Procedure for Daisy-Chaining
Daisy-chaining multiple qiks together on the same serial line is simple. Individually assign each qik a different
device ID using the set configuration parameter command (see Section 5.c), and then connect your TTL serial
transmit line to each qik’s RX line. If you wish, you can connect all of the qiks’ ERR lines to a single input on your
controlling module. When you issue your first Pololu-protocol command, the qiks will all automatically detect the
baud from the initial 0xAA byte.
Connecting multiple serial outputs to one serial input is more complicated. Each device will only transmit when
requested, so if each unit is addressed separately, multiple units will not transmit simultaneously. However, the
outputs are driven, so they cannot simply be wired together. Instead, you can use an AND gate (since the idle state
is high).
If you want to daisy-chain a qik with other Pololu devices that use 0x80 as an initial command byte, the
procedure becomes slightly more complicated. You should first transmit the byte 0x80 so that these devices can
automatically detect the baud rate, and only then should you send the byte 0xAA so that the qik can detect the
baud rate. Once all devices have detected the baud rate, Pololu devices that expect a leading command byte of
0x80 should ignore command packets that start with 0xAA and qiks will ignore command packets that start with
0x80.
Qik 2s9v1 User's Guide © 2001–2012 Pololu Corporation
4. Serial Interface Page 14 of 24
Vue de la page 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 23 24

Commentaires sur ces manuels

Pas de commentaire