| Electronic Components Datasheet Search |
|
WM0011 Datasheet(PDF) 95 Page - Cirrus Logic |
|
|
|||||||||||||||||||||||||||||
WM0011 Datasheet(HTML) 95 Page - Cirrus Logic |
|
95 / 233 page ![]() WM0011 Production Data w PD, Rev 4.1, August 2013 95 A typical protocol for an I 2C Master Read is illustrated and summarised in Figure 26. Write to I2C_CFG to enable I2C Master Write to I2C_INT_CTRL to enable I2C Master Interrupts Write to I2C_BAUD to configure the Bus speed Write to I2C_MTXDATA to configure ‘ACK/NACK’ for first data byte LAST_BYTE_FLAG=0 (ACK) or 1 (NACK) [Only select NACK before the last byte in transfer] Write to I2C_MCTRL to start transfer XFER_TYPE=1 (Read) XFER_TERM=1 (STOP Condition enabled) MSTR_ADDR=[as required] Wait for I2C Interrupt, then read I2C_STATUS Repeat until MSTR_RX_FILLED=1 Write to I2C_MTXDATA to configure ‘ACK/NACK’ for next data byte LAST_BYTE_FLAG=0 (ACK) or 1 (NACK) [Only select NACK before the last byte in transfer] [Not required after the last byte has been received] Read I2C_MRXDATA to retrieve new data byte [Read data byte is available in MRXDATA] [MRXDATA_FLAG indicates this is new data] Repeat until Last Byte received Wait for I2C Interrupt, then read I2C_STATUS Repeat until MSTR_XFER_DONE=1 B1 B0 B7 Read Data bits MRXDATA[7:0] ACK R/W B1 B0 B7 Read Data bits MRXDATA[7:0] ACK STOP ACK D6 D0 SDA SCLK Device Address MSTR_ADDR[6:0] (Read) START (NACK) Blue = Initiated by I2C Master Purple = Initiated by I2C Slave Figure 26 I2C Master Read A typical protocol for an I 2C Master Write, followed by Master Read is illustrated in Figure 27. Note that this transfer makes use of the “Repeated START Condition” before the Master Read. The implementation of this transfer is as described above for the Write and Read actions, except for setting XFER_TERM=0 for the I 2C Write - this configuration selects the “Rpt START” at the end of the I 2C Write. Figure 27 I2C Master Write & Read |
|
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 |