| Motore di ricerca datesheet componenti elettronici |
|
AS7225 Scheda tecnica(PDF) 22 Page - OSRAM GmbH |
|
|
|||||||||||||||||||||||||||||
AS7225 Scheda tecnica(HTML) 22 Page - OSRAM GmbH |
|
22 / 76 page ![]() Document Feedback AS7225 I²C Slave Interface Datasheet • PUBLIC DS000496 • v2-00 • 2019-Jun-28 75 │ 21 8.3.1 I²C Virtual Register Byte Read Pseudocode 1 Poll I²C slave STATUS register; 2 If TX_VALID bit is 0, the virtual register address for the read may be written; 3 Send a virtual register address; 4 Poll I²C slave STATUS register; 5 If RX_VALID bit is 1 the read data is ready; 6 Read the data. Sample Code uint8_t i2cm_AS72xx_read(uint8_t virtualReg) { volatile uint8_t status, d; while (1) { // Read slave I2C status to see if the read buffer is ready. Status = i2cm_read(I2C_AS72XX_SLAVE_STATUS_REG) ; if ((status & I2C_AS72XX_SLAVE_TX_VALID) == 0) // No inbound TX pending at slave. Okay to write now. break ; } // Send the virtual register address (setting bit 7 to indicate a pending write). i2cm_write(I2C_AS72XX_SLAVE_WRITE_REG, virtualReg) ; while (1) { // Read the slave I2C status to see if our read data is available. status = i2cm_read(I2C_AS72XX_SLAVE_STATUS_REG) ; |
|
Link URL |
| Lei ha avuto il aiuto da alldatasheet? [ DONATE ] |
Di alldatasheet | Richest di pubblicita | contatti | Privacy Policy | Collegamento alla scheda tecnica | scambio Link | Ricerca produttore 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 |