| Zakładka z wyszukiwarką danych komponentów |
|
INA232 Arkusz danych(PDF) 16 Page - Texas Instruments |
|
|
|||||||||||||||||||||||||||||
INA232 Arkusz danych(HTML) 16 Page - Texas Instruments |
|
16 / 39 page ![]() 7.5.2 Writing to and Reading Through the I2C Serial Interface Accessing a specific register on the INA232 is accomplished by writing the appropriate value to the register pointer. Refer to Register Maps for a complete list of registers and corresponding addresses. The value for the register pointer (see Figure 7-5) is the first byte transferred after the target address byte with the R/W bit low. Every write operation to the device requires a value for the register pointer. Writing to a register begins with the first byte transmitted by the controller. This byte is the target address, with the R/W bit low. The device then acknowledges receipt of a valid address. The next byte transmitted by the controller is the address of the register to be accessed. This register address value updates the register pointer to the desired internal device register. The next two bytes are written to the register addressed by the register pointer. The device acknowledges receipt of each data byte. The controller may terminate data transfer by generating a start or stop condition. When reading from the device, the last value stored in the register pointer by a write operation determines which register is read during a read operation. To change the register pointer for a read operation, a new value must be written to the register pointer. This write is accomplished by issuing a target address byte with the R/ W bit low, followed by the register pointer byte. No additional data are required. The controller then generates a start condition and sends the address byte for the target with the R/W bit high to initiate the read command. The next byte is transmitted by the target and is the most significant byte of the register indicated by the register pointer. This byte is followed by an Acknowledge from the controller; then the target transmits the least significant byte. The controller may or may not acknowledge receipt of the second data byte. The controller may terminate data transfer by generating a Not-Acknowledge after receiving any data byte, or generating a start or stop condition. If repeated reads from the same register are desired, it is not necessary to continually send the register pointer bytes; the device retains the register pointer value until it is changed by the next write operation. Figure 7-3 shows the write operation timing diagram. Figure 7-4 shows the read operation timing diagram. These diagrams are shown for reading/writing to 16 bit registers. Register bytes are sent most-significant byte first, followed by the least significant byte. Frame 1 Two-Wire Target Address Byte (1) Frame 2 Register Pointer Byte Start By Controller ACK By Target ACK By Target 1 9 1 ACK By Target 1 D15 D14 D13 D12 D11 D10 D9 D8 9 9 SDA SCL 1 0 0 A3 A2 A1 A0 R/W P7 P6 P5 P4 P3 P2 P1 P0 Frame 4 Data LSByte Frame 3 Data MSByte ACK By Target Stop By Controller 1 D7 D6 D5 D4 D3 D2 D1 D0 9 A. The value of the Target Address byte is determined by the setting of the A0 address pin. Refer to Table 7-1. B. The device does not support packet error checking (PEC) or perform clock stretching. Figure 7-3. Timing Diagram for Write Word Format Frame 1 Two-Wire Target Address Byte (1) Frame 2 Data MSByte (2) 1 Start By Controller ACK By Target ACK By Controller From Target 1 9 1 9 SDA SCL 0 0 A3 R/W D15 D14 D13 D12 D11 D10 D9 D8 A2 A1 A0 Frame 3 Data LSByte (2) Stop No ACK By (3) Controller From Target 1 9 D7 D6 D5 D4 D3 D2 D1 D0 A. The value of the Target Address byte is determined by the setting of the A0 address pin. Refer to Table 7-1. B. Read data is from the last register pointer location. If a new register is desired, the register pointer must be updated. See Figure 7-5. C. ACK by the controller can also be sent. D. The device does not support packet error checking (PEC) or perform clock stretching. Figure 7-4. Timing Diagram for Read Word Format INA232 SBOSAA2 – DECEMBER 2022 www.ti.com 16 Submit Document Feedback Copyright © 2022 Texas Instruments Incorporated Product Folder Links: INA232 |
|
Link URL |
| Czy Alldatasheet okazała się pomocna? [ DONATE ] |
O Alldatasheet | Reklama | Kontakt | Polityka prywatności | Link do karty katalogowej | Linki | Lista producentów 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 |