UnicoderTM Magnetic Encoder Frequently Asked Questions
Noetic Design, Inc.
All Rights Reserved. Nubotics, Unicoder, WheelWatcher and Unicoder are trademarks
of Noetic Design, Inc.
- Where can I buy it?
- I can't seem to get I2C commanding to work properly; the Sync command
works, but nothing else. What's wrong?
The Unicoder I2C slave mode requires the I2C master (your controller) to
support clock-stretching by the slave (the Unicoder). For many commands,
the Unicoder must perform some processing between reception of a command
via an I2C master write transfer, and a subsequent I2C master read request.
If the Unicoder receives a read request when it does not have data ready
yet, it will assert (hold low) the SCL line to signal to the master that data
is not ready. When data is ready, the Unicoder will release SCL, allowing
the transfer to continue. This clock-stretching method is part of the Philips
It will be helpful to test and debug your I2C master code with other simpler
I2C devices, such as I2C serial EEPROMs, to make sure it works prior to using
it with the Unicoder.
Further, many I2C master hardware implementations will require you to implement
certain time delays between operations. The Microchip PIC 18F series of controllers,
for example, require delays between issuing a STOP and any subsequent START,
of at least 4.7 microseconds (50 microseconds in SMBus environments). Shorter
times will result in unreliable behavior, including but not limited to bus