845x I2C Examples Always Return a Zero For The First ByteHardware: Industrial Communications
Problem: When I run the I2C shipping examples in LabVIEW, I always read a zero for the first byte. How can I avoid this? Solution: The I2C examples currently use a 16-bit address scheme for the writes and reads; the 8-bit address of the I2C controller is written to the first address byte, and a zero to the second address byte. Because of this, there is always a zero in the first byte if you have an I2C controller that uses 8-bit (word) addressing. To avoid reading a zero for the first byte, you can modify the example to use an 8-bit address scheme by following the steps below:
Related Links: Developer Zone Tutorial: I2C Bus Overview Attachments:
Report Date: 03/28/2006 Last Updated: 10/29/2008 Document ID: 3VRGOM5N |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
