beautypg.com

B. 0x81: get firmware version, Command 0x81 (129): get firmware version, C. 0x82: get error byte – Pololu Qik 2s12v10 User Manual

Page 23: Command 0x82 (130): get error byte

background image

5.b. 0x81: Get Firmware Version
Command 0x81 (129):

Get Firmware Version

Compact protocol: 0x81
Pololu protocol: 0xAA, device ID, 0x01

This command returns the a single ASCII byte that represents the version of the firmware running on the qik. All
qik 2s12v10’s produced so far have firmware version ‘1’ or ‘2’.

Firmware version 2 fixes a bug in the handling of motor fault errors (see

Section 5.c

for more information on

motor fault errors). Hardware-level motor errors cause the motor driver ICs on the qik to latch their outputs off
until the appropriate inputs are toggled. Firmware version 1 does not correctly toggle these inputs, so qiks with
firmware version 1 must have their power cycled in order to re-enable a motor driver that has experienced the
error. Firmware version 2 performs the necessary toggling automatically whenever a motor fault error occurs.

5.c. 0x82: Get Error Byte
Command 0x82 (130):

Get Error Byte

Compact protocol: 0x82
Pololu protocol: 0xAA, device ID, 0x02

The qik maintains an error byte, the bits of which, when set, reflect various errors that have occurred since the byte
was last read using this command. If we call the least-significant bit 0, the bits of the error byte are as follows:

bit 0:

Motor 0 Fault

A hardware-level error signaled by motor M0’s driver to indicate overtemperature or a short-circuit condition
on the output.

bit 1:

Motor 1 Fault

A hardware-level error signaled by motor M1’s driver to indicate overtemperature or a short-circuit condition
on the output.

bit 2:

Motor 0 Over Current

This error bit is set when the motor M0 current exceeds the motor M0 current limit parameter, current
limiting is enabled (i.e. the current limit is not zero), and the current limit response parameter is set to zero.
If the current limit response parameter is not zero, the qik automatically decreases the average motor voltage
to keep the current at the limit, and this error bit is not set.

bit 3:

Motor 1 Over Current

This error bit is set when the motor M1 current exceeds the motor 1 current limit parameter, current limiting
is enabled (i.e. the current limit is not zero), and the current limit response parameter is set to zero. If the
current limit response parameter is not zero, the qik automatically decreases the average motor voltage to
keep the current at the limit, and this error bit is not set.

bit 4:

Serial Hardware Error

A hardware-level error that occurs when a byte’s stop bit is not detected at the expected place or when the
hardware serial receive buffer is full. The former condition can occur if you are communicating at a baud
rate that differs from the qik’s baud rate. The latter condition should not occur during normal operation.

bit 5:

CRC Error

This error occurs when the qik is running in CRC-enabled mode (i.e. the CRC-enable jumper is in place) and
the cyclic redundancy check (CRC) byte at the end of the command packet does not match what the qik has

Qik 2s12v10 User's Guide

© 2001–2012 Pololu Corporation

5. Serial Parameters and Commands

Page 23 of 33