ADAU-1442/1445 i2c connection to PIC32
I'm trying to control a DSP on a working audio board, from another board with a PIC32, using I2C.
The processor on the board is an ADAU1445. The processor on the schematic is an ADAU1442.
I have verified that there is about 250ms of I2C traffic immediately after a reset. I'm not trying to access the I2C bus until another 250ms has passed.
I can communicate with all of the other I2C devices on the board. None of them require multi-byte reads, though.
I can write to the output gain parameter on the ADAU and see the appropriate amplitude change on the scope. Changing from 0dB to -6dB results in about a 50% drop in output amplitude.
If I try to read the output gain parameter, I get zeros.
Writing to the input select parameter doesn't do anything.
(1) Will Sigma Studio-generated code for an ADAU1445 run properly on an ADAU1442?
(2) I'm using the Microchip PIC32 macros for I2C. Is an additional delay necessary on the reads?
Audio Signal Processors
adau1442
adau1445
SigmaDSP Audio Processors
Hello JSimon719,
Sorry for the delay in responding.
Question 1) The code will be the same and will work on the 1442,1445, 1446 provided the program is not trying to use hardware features that are not supported, like the ASRCs or multiple clocking domains.
Question 2) Since you are able to write to at least one parameter and see the change, (good troubleshooting work by the way), this means that you are "talking" to the part. You have the correct device address and there is no issue with the I2C bus itself. So you answered a lot of questions.
Please excuse me if this seems too simple but it is a bit tricky to do a read so I need to mention this possibility. I am wondering if you are not following the read sequence exactly. To read you must first Write the address that you want to read from, then send a repeated start (this means no stop condition was transmitted) and then send the chip address again and start reading in the data. You do not need to add any delay since transmitting the repeated start and the chip address byte again will be more than enough time for the DSP to have the data ready to transmit back to you.
Here is a screenshot of the sequence.
So I am wondering if this is the problem. It would fit the symptoms you are mentioning so far.
Regarding writing to the input select, I would have to see the program and exactly which register you were writing to. This part is rather complicated so it is easy to be writing to the wrong register or it is not in the signal path. I would have to see the details.
Feel free to upload your program.
Dave T
Please log in to reply.