Page 1 of 1

i2c example adc mcp3426 wanted

Posted: Mon May 13, 2013 10:09 pm
by rene
Hello boys and girls ...

Question ...
Who has experience or can help me to get a MCP3426A0. 16 bit i2c working

I can not get it done. (not even after much struggling and trying) :oops:
The i2c FC example do not help me. :(


Ecio works .....
The display works ...
I2c MCP3426 ADC not yet.
connected as in manual ...
http://ww1.microchip.com/downloads/en/D ... 22226a.pdf

Now I'm looking for a example...:

ECIO40 or other PIC with i2c and the MCP3426 in 12bit mode ..
Value of channel 1 Visible on 2x16 LCD display
A value back 1 times per second, wil be fast enough.

Who can and will help me.??

Thanks,

Rene

Re: i2c example adc mcp3426 wanted

Posted: Tue May 14, 2013 9:24 am
by Benj
Hi Rene,

Do you have your project so far you could upload so we can see where your getting stuck and so were not starting from scratch.

Re: i2c example adc mcp3426 wanted

Posted: Tue May 14, 2013 4:02 pm
by rene
additional information from microchip site:
Adress; = 000

I2C_start();
I2C_sendbyte(0b11010001); // MCP4326 address byte with READ command for ADC CH1
I2C_readbyte(); // Read Upper Data Byte
I2C_Ack(); // Send ACK so ADC can send Lower data Byte
I2C_readbyte(); // Read Lower data Byte
I2C_Nack(); // Send NAK to ADC
I2C_stop(); // Send Stop

Re: i2c example adc mcp3426 wanted

Posted: Tue May 14, 2013 8:37 pm
by rene
For those who find it important ......

Communication with the MCP3426 via I2C succeeded.
Attached you will find the example program, as it currently operates.
There is still to do some work, but with this I can move on.
Suggestions and improvements are always welcome, It was my first encounter with i2c :cry:

My previous versions and post are deleted, because these do not contribute.

Greeting and thanks ...

Rene