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.

PCM1865: How to read and write registers over a I2C interface.

Part Number: PCM1865


I've been reading the PCM1865 datasheet and can't find out how to read or write the registers over a I2C interface. Figure 50 on page 64 shows the same data schema for read and write operations.

This forum threads from 7 years ago mentions how to read the registers value
e2e.ti.com/.../1669849

but how do I write to them?
Do I need a "Repeated/continued start"?
How do I change page? Does it have its own I2C schema?

Next, I have some questions about reserved bits inside some registers: registers 41, 42, 43, 51 to 54 (maybe among others) have reserved bits with the description "Reserved. Do not access.". If I want to configure the PLL manually (for example) I would need to write to these registers and "access" to them.
Then there are some registers like 97, 114, 115, 116 or 117 that say to write a specific value to the reserved bits but the register itself is read only, which makes no sense (or maybe the register is "R/W" but the "/W" got erased). This is not really a problem as long as the registers are actually read-only.

Thank you very much

Figure 50 from datasheet.

  • Hi Agustin,

    Read this app note on I2C to get a better understanding: https://www.ti.com/lit/an/slva704/slva704.pdf

    In short a write is done by sending the address of the device to be written to, then the address of the desired register, then the data to be written. No repeated start conditions are needed for a write. To change page, you write to register 0x00 the page you wish to change to. For example if I wanted to change to page 4, I would write "w 0x(Device Address) 0x00 0x04"

    For the registers you're explaining, I understand you're confusion. In practice these mean the same things. You can write to a register that has reserved portions as long as you are not changing the reserved bits themselves. To use 41 as an example, you can whatever you wish to bits 6-0 as long as bit 7 remains a 0. In general you should not write to a read only register so you shouldn't have to worry about those registers speaking to what to write to them. It's an extra warning in the case that you write to those registers.

    Best regards,

    Jeff

  • Thank you Jeff. I'll try that out.