Page 1 of 1

I2C addressing??

Posted: Mon Aug 07, 2017 5:13 pm
by jkeny
I know I'm missing something obvious here so maybe somebody can help me see it - I'm trying to control my DAC chip with I2C commends & it ain't working

The DAC chip is PC5242 & it states it's default address is 10011XY where XY are set by pins on the chip - I have both these pins to ground to give addr 1001100 which I have to convert to Hex 0x4C - so that's my device addr

The registers are also 7 bit format but that doesn't affect the bit of I2C coding I'm doing as a test
Register 3 Page 0 on the chip controls Lmute & Rmute - the bit pattern as follows 000Lmute000Rmute - bit Lmute is set high to mute Left channel

There are triggers on the Amanero firmware for certain events - two of which are On88set & On176set
So,as a test that I2C is working, when playing a 88.2KHz file, I mute the right channel with the commands
0x4c 0x0 0x0 - set page to 0
0x4c 0x3 0x1 - mute R channel

When playing 176 sample rate files (On176set event), I mute the left channel with command
0x4c 0x3 0x10 - mute L channel (the data 0x10 is the hex equivalent of the 8 bit binary 00010000)

This test is not working - any ideas what am I doing wrong?

Edit: Oh yeah, just in case you think "Has he set the DAC to I2C mode" - pin 23 is low(gnd) & pin 24 is high (3.3V through 10K resistor)

Re: I2C addressing??

Posted: Mon Aug 07, 2017 6:02 pm
by frd1996
John,

I am not an expert. If you use 7bit addressing then 1001100 address is packed as 1001100X, where X is R/W bit. According to this you address should be 0x98 or 0x99 depending whether you are reading or writing. More information about I2C addressing can be found here:

https://www.totalphase.com/support/arti ... Addressing

Re: I2C addressing??

Posted: Mon Aug 07, 2017 6:22 pm
by jkeny
frd1996 wrote: Mon Aug 07, 2017 6:02 pm John,

I am not an expert. If you use 7bit addressing then 1001100 address is packed as 1001100X, where X is R/W bit. According to this you address should be 0x98 or 0x99 depending whether you are reading or writing. More information about I2C addressing can be found here:

https://www.totalphase.com/support/arti ... Addressing
Thanks Frederyk
Tried 0x98 address for write & still no go - I suspect that in some Amanero firmware combinations I2C isn't working
The Amanero board is a software mess with lot sof CPU firmwares + Lots of CPLD firmwares & not a bit of documentation to be found about them & their dependencies

I'll keep using the 0x98 address with different firmware & see if I get success

Re: I2C addressing??

Posted: Mon Aug 07, 2017 7:57 pm
by jkeny
Got it
Turns out 0x4C address is correct