yefj
Advanced Member level 5
Hello,I am try to communicate with MCP3421 over I2C,from the data sheet table shown bellow the configuration register should be X0011100.
G1,G0=00=X1 Gain
S1,S0=11=18 bits
O*/C=1 continues mode
C1,C0=00=dont care
bit7 RDY*-X-Not in our control
In section 5.3.1 they describe the I2C procedure for the first part:
St->1101,000,0(device code,defalt factory adrress,write bit)->
then We send configuration byte(for config register):
X0011100
I dont know what value to put in the RDY* bit?
So till now the structure is St->ADDRESS+write(0)->ACK->Configuration Byte->ACK->Stop by master
The big issue is with the second part of reading converter data:
I send St->ADDRESS+read(1) and i should get ACK->4bytes(3 data,1 config bytes)->NACK->Stop
I cand understand this part of the data sheet:
We suppose to get 3 data bite and configuration byte,
from the diagram in page 20 i cant see what are D17,D16 are for?
if we ignore 6 bits then we dont have animore 18 bit resolution?
And i could not see how to controlif i want to add configuration bit?
I'll be glad to have some itnuition regarding these points.
Thanks.
G1,G0=00=X1 Gain
S1,S0=11=18 bits
O*/C=1 continues mode
C1,C0=00=dont care
bit7 RDY*-X-Not in our control
In section 5.3.1 they describe the I2C procedure for the first part:
St->1101,000,0(device code,defalt factory adrress,write bit)->
then We send configuration byte(for config register):
X0011100
I dont know what value to put in the RDY* bit?
So till now the structure is St->ADDRESS+write(0)->ACK->Configuration Byte->ACK->Stop by master
The big issue is with the second part of reading converter data:
I send St->ADDRESS+read(1) and i should get ACK->4bytes(3 data,1 config bytes)->NACK->Stop
I cand understand this part of the data sheet:
We suppose to get 3 data bite and configuration byte,
from the diagram in page 20 i cant see what are D17,D16 are for?
if we ignore 6 bits then we dont have animore 18 bit resolution?
And i could not see how to controlif i want to add configuration bit?
I'll be glad to have some itnuition regarding these points.
Thanks.