This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AFE4404: Reading non-output registers in AFE4404

Part Number: AFE4404

Hello, 

I have been working with an AFE4404 + SFH7050 sensor and everything seems to work. I control them with an Arduino and have been able to get CLKOUT and output led values from AFE. However, other register values always return zero even after I enable REG_READ. 

I need to know these information:

- in an i2c operation before reading a specific register (e,g, reg 0x23), should I do a write i2c_write(0x00, 0x01) to enable reading, then maybe wait for some time, and then do a write to target register followed by requesting 3 bytes? I did exactly this and just received zero. 

- should I skip sending a start flag on i2c bus and write the target register after writing REG_READ? I haven't tried it. 

- REG_READ will stay enabled and requires being set only once or I will need to do the operation every time I want to read a register?

Thanks,

Mona

  • Hi Mona,

    Here is the correct sequence to read a register.
    1) Set the REG_READ bit. i.e. I2C_Write ( 0x00, 0x000001)
    2) Read the required register I2C_Read (0x23) //
    3) Read the required register I2C_Read (0x1D) // You can read multiple registers once REG_READ is set.
    4) Reset the REG_READ bit. i.e. I2C_Write ( 0x00, 0x000000)

    Now the functions "I2C_Write" and "I2C_Read" should be such that they produce the waveform as given in Figure 30 and 31 of the datasheet respectively.

    Regards,
    Prabin.