Domino IC2 configuration help

OK but should I not see something if I adjust the voltage going to Ain?

 

OK martinayotte now I’m really lost :frowning:

I was able to install python mini on my domino, but I don’t know how to install smbus.

I was thinking that I would be able to see some kind of change in i2cdetect -y 0 if I adjusted the voltage of Ain on my ADC. So now you are saying I need smbus to see this change?

Also I purchased an i2c LCD for testing but I can’t seem to find a tutorial on how to control it, alzhao had referred me to this link:

but its not really clear or complete for i2c.

Thanks!

Paul

Hi Paul,

I2cdetect is only a tool to discover the presence of I2C devices, but it doesn’t do any thing else.

If you wish to do transaction at command line, the i2cset and i2cget is what you need, try “i2cget -y 0 0x4d” and see what it is returning.

python smbus is only a suggestion if you want to use python to control the bus.

One of the implementation can be found here : pysmbus/smbus.py at master · bjornt/pysmbus · GitHub

If you wish to write in C, you can open the I2C bus device as a file localed in /dev/i2c-0 for example, and doing some read/write operation on the device.

According, to the specs, ADC conversion seems to be started when executing a single write to the device and then reading it returned value.

For the LCD, you should look at its specs, there is similar transactions to achieve, there is probably severals registers to initialize.

 

OK thanks for the help again martinayotte!

martinayotte,

Great news! “i2cget -y 0 0x4d” works! And if I adjust the voltage going to my ADC Ain I can see different readings! (screenshots attached)

Now I asked my app developer to look into python smbus for me.

Thanks so much for your help!!!

Paul

Good !

Then, your developer should look for python smbus that support read_block() since, I think the link I provided only support read_byte(), because your have 2 bytes to be read to get the 12bits of the ADC, but some other libs are providing that.

For better tests, maybe your should try “i2cget -y 0 0x4d 0x00 w” to see if it answer with 2 bytes properly.

 

 

OK I will let him know thanks again!