
0x95 offset
lower
7
bits
of
value
(0 to 127)
most
significant
bit of value
(0 or 1)
first data byte (the
offset) with lower
7 bits inverted
second
data
byte with lower
7 bits inverted
third data byte
with
lower
7 bits inverted
Description:
This command writes a value to one byte in the Motoron’s EEPROM memory, which is a 128-byte
non-volatile memory that is used to store settings that persist through power interruptions and
resets.
This command
only
works while the JMP1 pin is shorted to GND. If the JMP1 pin is not shorted
to GND when this command is received, the EEPROM will not be modified.
This command takes about 5 ms to finish writing to the EEPROM. The Motoron’s microcontroller
is stopped during this time, so it will not be able to respond to other commands or update its
outputs. After running this command, we recommend waiting for at least 6 ms before you try to
communicate with the Motoron.
Warning:
Be careful not to write to the EEPROM in a fast loop. The EEPROM memory
of the Motoron’s microcontroller is only rated for 100,000 erase/write cycles.
The only setting currently stored in the EEPROM memory is the
EEPROM device number
, a
number between 0 and 127 that is stored at offset 1. The Motoron uses this number as its I²C
address if it detects that JMP1 is not shorted to GND when it starts up. The default EEPROM
device number is 16.
Although this command can write to any byte in EEPROM, we recommend that you only write to
the EEPROM device number (offset 1). The byte at offset 0 is used internally by the Motoron, and
the bytes at other offsets are reserved for use by new features in future firmware versions.
The first three data bytes after the command byte encode the offset and value. The last three
data bytes are copies of the first three, but with the lower 7 bits inverted. If the third data byte
is something other than 0 or 1, or the last three data bytes are incorrect, the Motoron reports
a protocol error. The extra bytes in the command reduce the risk of accidental writes to the
EEPROM.
Pololu Motoron Motor Controller User’s Guide
© 2001–2022 Pololu Corporation
9. Command reference
Page 55 of 67