MTX -3G-JAVA series User Manual page 58

Table of Contents

Advertisement

 
 
A/D conversion 
 
In order to read samples from the ADC buffer, you have to send three bytes over the I2C bus before 
sending the I2C STOP condition 
 
1. Address byte (write mode): 0x90 hexadecimal 
2. Control byte:  
a. 0x00 hexadecimal to read from ADC1 
b. 0x01 hexadecimal to read from ADC2  
3. Address byte (read mode): 0x91 hexadecimal 
4. Dummy byte 1: 0x00 hexadecimal 
5. Dummy byte 2: 0x10 hexadecimal 
 
After  that  you  should  have  three  bytes  in  the  I2C  read  buffer:  the  second  one  is  the  8‐bit  sample 
value retrieved from the AD converter, in straight binary format. 
 
You can calculate the voltage value from the A/D input using the following expression: 
 
 
where V
 is the voltage value present at the A/D converter input (0 ≤ V
ADC
sample value in decimal format (0 ≤ D ≤ 255) 
 
 
www.mtx‐terminals.com 
3
256
www.mtxm2m.com 
 
MTX M2M® by MATRIX ELECTRONICA S.L.U 
MTX‐3G‐JAVA Family
 
 ≤ 2988.3mV) and D is the 
ADC
2015/10 v1.6  
 
/
Page 58
109 

Advertisement

Table of Contents
loading

Table of Contents