2.7.3.4 Block Read (Auto Increment Mode)
This command reads a block of bytes, starting from a designated register that is specified through the command byte. The address gets incremented by one automatically, and the registers are read in order starting from the address provided by the command byte.
The Block/Auto increment read command is as follows, and it is illustrated in the following timing diagram.
- Send START sequence
- Send 7-bit target address
- Send the R/W bit – 0 to indicate a write operation
- Wait for Acknowledge from the target
- Send the command byte – Initial address that needs to be read.
- Wait for acknowledge from the target
- Send START sequence again (repeated START Sr)
- Send the 7-bit target address
- Send R/W bit – 1 to indicate a read operation
- Wait for Acknowledge from the target
- Receive the 8-bit data from the target register indicated in step 5 starting from MSB
- Acknowledge from the host receiver.
- Receive the 8-bit data from the next register starting from MSB
- Acknowledge from the host receiver.
Note: on the last byte, the host receiver issues a NACK in place of ACK to signal the end of the data transfer.
- Repeat steps 13&14 until last byte.
- STOP sequence is sent.
In Block Read, the register order will be automatically incremented by one step regardless of the register order. So, for example, after reading from register location 0x15, the next register address to be read will be 0x16, not 0x20.
Reading from non-existent or not accessible registers addresses will stream out 0xFF.
Also note that if the host keeps reading data beyond the last register location, the MCP16503 streams out 0xFF (all “1”s). There is no register address wrap-around.
In Block Read auto-increment mode, the host receiver must signal an end-of-data to the transmitter by not generating an acknowledge on the last byte that has been clocked out of the target. In this event, the transmitter must leave the data line HIGH to enable the host to generate a STOP condition.
