Stop motor (any input mode) – Pololu Simple User Manual

Page 70

Advertising
background image

Command Byte

Data Byte 1

Data Byte 2

Compact Protocol

0xC2 (194)

-

-

Pololu Protocol

0xAA (170)

device number

0x42 (66)

Response Format:

Response Byte 1

Response Byte 2

Response Byte 3

Response Byte 4

product ID low

byte

product ID high

byte

minor FW version (BCD

format)

major FW version (BCD

format)

Description: This command lets you read the Simple Motor Controller product number and firmware version
number. The first two bytes of the response are the low and high bytes of the product ID (each Simple Motor
Controller version has a unique product ID), and the last two bytes of the response are the firmware minor and
major version numbers in

binary-coded decimal (BCD) format

[http://en.wikipedia.org/wiki/Binary-coded_decimal]

.

BCD format means that the version number is the value you get when you write it in hex and then read it as if it
were in decimal. For example, a minor version byte of 0x15 (21) means a the minor version number is 15, not 21.

Example:

To request the product ID and firmware version, we would transmit the following compact protocol byte and wait
until we have received four bytes in response from the Simple Motor Controller (or until our receiving function
times out, which could happen if there is a problem):

We Send:

Command Byte

Compact Protocol

0xC2 (194)

We Receive:

Response Byte 1 Response Byte 2 Response Byte 1 Response Byte 2

0x98 (152)

0x00 (0)

0x00 (0)

0x01 (1)

This response tells us that the product ID is 0x0098 (152) and the firmware version is 1.0.

Stop Motor (any input mode)

Command Format:

Command Byte

Data Byte 1

Data Byte 2

Compact Protocol

0xE0 (224)

-

-

Pololu Protocol

0xAA (170)

device number

0x60 (96)

Description: This command sets the motor target speed to zero and makes the controller susceptible to a safe-start
violation error if Safe Start is enabled. Put another way, this command will stop the motor (configured deceleration

Pololu Simple Motor Controller User's Guide

© 2001–2014 Pololu Corporation

6. Using the Serial Interface

Page 70 of 101

Advertising