| Electronic Components Datasheet Search |
|
MXT1664T3 Datasheet(PDF) 35 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MXT1664T3 Datasheet(HTML) 35 Page - Microchip Technology |
|
35 / 98 page ![]() MXT1664T3 2.0 2018 Microchip Technology Inc. DS40002054A-page 35 8.4 Reading From the Device Two I2C bus activities must take place to read from the device. The first activity is an I2C write to set the address pointer (LSByte then MSByte). The second activity is the actual I2C read to receive the data. The address pointer returns to its starting value when the read cycle NACK is detected. It is not necessary to set the address pointer before every read. The address pointer is updated automatically after every read operation. The address pointer will be correct if the reads occur in order. In particular, when reading multiple messages from the Message Processor T5 object, the address pointer is automatically reset to allow continuous reads (see Section 8.5 “Reading Status Messages with DMA”). The WRITE and READ cycles consist of a START condition followed by the I2C address of the device (SLA+W or SLA+R respectively). Note that in this mode, calculating a checksum of the data packets is not supported. Figure 8-3 shows the I2C commands to read four bytes starting at address 0x1234. FIGURE 8-3: EXAMPLE OF A FOUR-BYTE READ STARTING AT ADDRESS 0x1234 8.5 Reading Status Messages with DMA The device facilitates the easy reading of multiple messages using a single continuous read operation. This allows the host hardware to use a direct memory access (DMA) controller for the fast reading of messages, as follows: 1. The host uses a write operation to set the address pointer to the start of the Message Count T44 object, if necessary. Note that the STOP condition at the end of the read resets the address pointer to its initial location, so it may already be pointing at the Message Count T44 object following a previous message read. If a checksum is required on each message, the most significant bit of the MSByte of the read address must be set to 1. 2. The host starts the read operation of the message by sending a START condition. 3. The host reads the Message Count T44 object (one byte) to retrieve a count of the pending messages. 4. The host calculates the number of bytes to read by multiplying the message count by the size of the Message Processor T5 object. Note that the host should have already read the size of the Message Processor T5 object in its initialization code. Note that the size of the Message Processor T5 object as recorded in the Object Table includes a checksum byte. If a checksum has not been requested, one byte should be deducted from the size of the object. That is: number of bytes = count × (size – 1). 5. The host reads the calculated number of message bytes. It is important that the host does not send a STOP condition during the message reads, as this will terminate the continuous read operation and reset the address pointer. No START and STOP conditions must be sent between the messages. 6. The host sends a STOP condition at the end of the read operation after the last message has been read. The NACK condition immediately before the STOP condition resets the address pointer to the start of the Message Count T44 object. Read Data START SLA+R 0x96 0x9B 0xA0 0xA5 STOP START SLA+W 0x34 0x12 Read Address (LSB, MSB) Set Address Pointer Read Data STOP |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |