MTX
‐
3G
‐
JAVA
Family
www.mtx
‐
terminals.com
www.mtxm2m.com
2015/10
v1.6
Page
58
/
109
MTX
M2M®
by
MATRIX
ELECTRONICA
S.L.U
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:
3
256
where
V
ADC
is
the
voltage
value
present
at
the
A/D
converter
input
(0
≤
V
ADC
≤
2988.3mV)
and
D
is
the
sample
value
in
decimal
format
(0
≤
D
≤
255)