Go Down

Topic: I2C volume control (Read 6557 times) previous topic - next topic



I've bought a 2 channel volume control chip called M62429P. Actual it is just a digital potentiometer with two channels. The component has been attached to my Arduino UNO board and I am trying to control the volume using the "Wire" library.

The components datasheet can be found here:

I have been trying to send the 11 bits in two bytes via the Wire.write(byte) command, but with no luck.
Also I am not sure of the direction of the bits.

Can anyone help me with a command for sending e.g 0db, -43db and -?db



From what I seen in the datasheet it's seems to be easy.
Are you connecting the I2C lines in the right pins?
Uno A4 (SDA), A5 (SCL)

Code: [Select]

byte val[10] = {0x01 .........};//all the elements you want to send
void setup()
Wire.begin(); // join i2c bus

void loop()
  Wire.write(val,11);             // fill data buffer to be transmited-> 11 bytes
  Wire.endTransmission();     // stop transmitting

Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B


Thanks for the quick reply.

The pins are connected correctly. It sounds easy but I really can not get it working... :/

The function beginTransmission(byte) takes one argument - the address, which I can't find in the data sheet and can not be set using e.g. short-circuit on the IC.

You are sending 11 bytes. Shouldn't it be bits?
I am thinking something like 0b00101011111 for 0db or 0b11111010100 if the bits are ordered in reverse.


You are sending 11 bytes. Shouldn't it be bits?

Yes my mistake.You are right  :smiley-mr-green:
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B


Do I need to use begin- and endTransmission when I have no address to put as argument?

I've tried to split the data into two bytes but with no luck. Do you have any suggestions?



Hi christianlykke,

hm the datasheet is not so clear -
you can try to use the i2c_scanner
there is another I2C Scanner out there.
as fare as i know normaly you have to use the begin and end Transmission funcitons.
otherweise the i2c or TWI will not work.
you can also check the return of the Wire.endTransmission() :

byte, which indicates the status of the transmission:

    1:data too long to fit in transmit buffer
    2:received NACK on transmit of address
    3:received NACK on transmit of data
    4:other error

for your chip are not much infos available..
pleas report back if you found something out.

sunny greetings stefan


Apr 24, 2013, 09:50 am Last Edit: Apr 24, 2013, 09:54 am by christianlykke Reason: 1
Hi Stefan

Thanks for your reply.

Good idea scanning for the address. But unfortunately the scanner finds no I2C components.

I've tried attaching another I2C component which works perfectly so I am pretty sure the component is attached correctly.

I am running out of ideas :/



Hi Christian,

Did you ever get this chip working?  Seems the data is to be clocked in raw, bit by bit, similar to SPI (can test this with a loop and two pins).

I was recently looking for a digital potentiometer for a project and this came to my attention, unfortunately information on it (and it's behavior) is quite sparse...

Best regards,

Go Up