MTX
‐
3G
‐
JAVA
Family
www.mtx
‐
terminals.com
www.mtxm2m.com
2015/10
v1.6
Page
57
/
109
MTX
M2M®
by
MATRIX
ELECTRONICA
S.L.U
4.4.4
Analog
‐
to
‐
Digital
and
Digital
‐
to
‐
Analog
converters
The
ADC/DAC
of
the
MTX
‐
3G
‐
JAVA
consists
of
two
independent,
unbalanced,
multiplexed
analog
inputs
as
well
as
one
unbalanced
analog
output,
which
can
be
used
for
measuring
external
DC
voltages
in
the
range
of
0mV…+2988.3mV,
or
generate
them
in
the
same
range.
Both
ADC
and
DAC
have
a
resolution
of
8
bits,
which
means
that
the
voltage
resolution
in
the
given
range
is
11.71875mV.
The
MTX
‐
3G
‐
JAVA
has
an
internal
ADC/DAC
chip
(PCF8591)
connected
to
its
I2C
bus,
at
a
7
‐
bit
address
0x48
hexadecimal.
Maximum
bus
frequency
allowed
is
100kHz.
The
A/D
converter
uses
the
successive
approximation
conversion
technique.
The
D/A
converter
and
a
high
‐
gain
comparator
are
used
temporarily
during
the
A/D
conversion
cycle.
The
D/A
converter
consists
of
a
resistor
divider
chain
connected
to
the
external
reference
voltage
with
256
taps
and
selection
switches.
The
tap
‐
decoder
switched
one
of
these
taps
to
the
DAC
output
line.
The
analog
output
voltage
is
buffered
by
an
auto
‐
zeroed
unity
gain
amplifier.
In
order
to
release
the
DAC
for
an
A/D
conversion
cycle
the
unity
gain
amplifier
is
equipped
with
a
track
and
hold
circuit.
This
circuit
holds
the
output
voltage
while
executing
the
A/D
conversion.
You
can
configure
and
use
the
ADC/DAC
converters
by
issuing
I2C
related
AT
commands
or
via
the
I2C
Java
class.
The
maximum
A/D
and
D/A
conversion
rate
is
given
by
the
actual
speed
of
the
I2C
bus.
You
can
find
Java
code
examples
in
the
Downloads
section
at
www.mtxm2m.com
D/A
conversion
In
order
to
write
a
new
sample
to
the
DAC
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:
0x40
hexadecimal
3.
Data
byte:
the
8
‐
bit
sample
value
in
straight
binary
format
You
can
calculate
the
sample
value
you
have
to
write
to
the
D/A
converter
using
the
following
expression:
256
3
where
D
is
the
sample
value
in
decimal
format
(0
≤
D
≤
255)
and
V
DACOUT
is
the
voltage
value
you
want
to
generate
(0
≤
V
DACOUT
≤
2988.3mV)