The Integrated Motor Encoder (IME) defaults to address 0x60 and is terminated (on power-up). Once the address of the 1st device in the chain has been changed (via REG 0x4D), the terminator must be disabled (via REG 0x4B) in order to communicate to the next device in the chain. When the IME is in the “Disable Terminator” state, it passes the I2C Clock and Data lines to the next device in the I2C chain. When a device is in the “Enable Terminator” state, it does not pass on the I2C Clock and Data lines. The last device in the chain must be terminated (via REG 0x4C).
The suggested address range must be from 0x20 to 0x5E and each device address must be an even number. All devices in the chain can be reset by using a general call address (0x00) followed by a reset command sequence (via REG 0x4E). All device configurations can be erased using the proper command sequence during a general call.
Once the device is powered up, the LED will remain yellow until a new address has been received (via REG 0x4D).
The following is a description of each read only (RO) or write only (WO) register.
Register Address (RO unless specified)
0x00-0x07 Version (Ascii Version #)
0x08-0x0F Vendor (Ascii Vendor “VEX”)
0x10-0x18 Device ID (Ascii Device ID)
0x20 Read Device Information
Byte0 Version #
Byte1 Type (1: IME)
Byte2 Board Id (2: Small IME, 3: Large IME)
Byte3 Device Status
Bit 0 Termination (0:Not Terminated, 1:Terminated)
Bit 1 Overflow (0:No Overflow, 1:Overflow Occurred)
Bit 2 Diagnostic Mode (0: off, 1: on)
Bits 3-7 N/A
0x40-0x47 Read Device Data (Rotation tics 48bits, Velocity 16bits)
0x40 Rotation tics bits 15-08 (Msb)
0x41 Rotation tics bits 07-00 (Lsb)
0x42 Rotation tics bits 31-24 (Msb)
0x43 Rotation tics bits 23-16 (Lsb)
0x44 Velocity bits 15-08 (Msb)
0x45 Velocity bits 07-00 (Lsb)
0x46 Rotation tics bits 47-40 (Msb)
0x47 Rotation tics bits 39-32 (Lsb)
0x4A (WO) Clear Device Counters
0x4B (WO) Disable Terminator (so next device on chain can be seen)
0x4C (WO) Enable Terminator (Default, device is last in chain)
0x4D (WO) Change device address
Byte0 New address (Range from 0x20 – 0x5E)
*** Note: if the device is reset it will revert to factor default address
0x60-9B (RO) Read Scratch Pad Data (60 bytes)
0xA0-DB (WO) Write Scratch Pad Data (60 bytes)
This register will only operate on a General Call Address (0x00)
0x4E (WO) Reset ALL VEX Devices
Byte0 = 0xCA (Command Byte)
Byte1 = 0x03 Reset Device
The following is a description of LED patterns:
Yellow - not initialized (default Address)
Every 3 sec
Slow Green Blip - initialized and in neutral
Slow Green Double Blip - initialized, neutral and terminated
Slow Green Micro Blip - initialized, device is idle
Blinking Green - relative to speed
Solid Green - full speed in either direction
Yellow (same as Green patterns) - counter overflow
Solid Red - data is being written to EEprom (1sec)
Blinking Red - address range error (a valid address will clear error)