I2C addressing??

Anything to do with computer audio, hardware, software etc.
Post Reply
jkeny
Posts: 2387
Joined: Sun Jan 17, 2010 9:37 pm

I2C addressing??

Post 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)
www.Ciunas.biz
For Digital Audio playback that delivers WHERE the performers are on stage but more importantly WHY they are there.
frd1996
Posts: 171
Joined: Sat Apr 17, 2010 10:38 am

Re: I2C addressing??

Post 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
jkeny
Posts: 2387
Joined: Sun Jan 17, 2010 9:37 pm

Re: I2C addressing??

Post 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
www.Ciunas.biz
For Digital Audio playback that delivers WHERE the performers are on stage but more importantly WHY they are there.
jkeny
Posts: 2387
Joined: Sun Jan 17, 2010 9:37 pm

Re: I2C addressing??

Post by jkeny »

Got it
Turns out 0x4C address is correct
www.Ciunas.biz
For Digital Audio playback that delivers WHERE the performers are on stage but more importantly WHY they are there.
Post Reply