| Motore di ricerca datesheet componenti elettronici |
|
AS7225 Scheda tecnica(PDF) 20 Page - ams-OSRAM AG |
|
|
|||||||||||||||||||||||||||||
AS7225 Scheda tecnica(HTML) 20 Page - ams-OSRAM AG |
|
20 / 76 page ![]() Document Feedback AS7225 I²C Slave Interface Datasheet • PUBLIC DS000496 • v2-00 • 2019-Jun-28 75 │ 19 8.2 I²C Virtual Register Write Access I²C Virtual Resister Byte Write, detailed below, shows the pseudocode necessary to write virtual registers on the AS7225. Note that, because the actual registers of interest are realized as virtual registers, a means of indicating whether there is a pending read or write operation of a given virtual register is needed. To convey this information, the most significant bit of the virtual register address is used as a marker. If it is 1, then a write is pending, otherwise the slave is expecting a virtual read operation. The pseudocode illustrates the proper technique for polling of the I²C slave status register to ensure the slave is ready for each transaction. 8.2.1 I²C Virtual Register Byte Write Pseudocode 1 Poll I²C slave STATUS register; 2 If TX_VALID bit is 0, a write can be performed on the interface; 3 Send a virtual register address and set the MSB of the register address to 1 to indicate the pending write; 4 Poll I²C slave STATUS register; 5 If TX_VALID bit is 0, the virtual register address for the write has been received and the data may now be written; 6 Write the data. Sample Code #define I2C_AS72XX_SLAVE_STATUS_REG 0x00 #define I2C_AS72XX_SLAVE_WRITE_REG 0x01 #define I2C_AS72XX_SLAVE_READ_REG 0x02 #define I2C_AS72XX_SLAVE_TX_VALID 0x02 #define I2C_AS72XX_SLAVE_RX_VALID 0x01 void i2cm_AS72xx_write(uint8_t virtualReg, uint8_t d) { volatile uint8_t status ; while (1) { |
|
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 |