Hello
I have a circuit with a Microchip PIC32MX250F128D mcu as a I2C master to communicate with a ADAU1701.
I use the standard PIC32 I2C libraries from Microchip.
I want to read signal values using a Readback cell.
I followed indications given in posts like this one:
http://ez.analog.com/docs/DOC-3130
A typical read sequence is:
write 2bytes, read request, read values 3-4bytes.
Everything works fine with SigmaStudio and the USBi interface.
I copied the sequence form the capture window in SigmaStudio to my MCU code and it just doesn't work.
The I2C code is functional because I can read/write to registers in the ADAU1701 (example: mute/unmute commands work fine).
I then probed the I2C bus.
With the USBi the clock is stretched a few us just after writing the 2 bytes and before the read command.
With the PIC32, the clock is not stretched at all and the bytes read are always zero.
I checked everything bit by bit and this is the only difference.
I try to avoid rewriting the I2C libraries or doing software bit-banging but maybe I will have to.
Has anyone came across similar I2C issues with PIC32 and found a solution?
Any suggestion appreciated.
Thanks