I2C addressing??
Posted: Mon Aug 07, 2017 5:13 pm
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)
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)