HT46R01A
A/D Transfer Function
Interrupts
As the device contain an 8-bit A/D converter, its
full-scale converted digitised value is equal to 0FFH.
Since the full-scale analog input value is equal to the
Interrupts are an important part of any microcontroller
system. When an external event or an internal function
such as a Timer/Event Counter or an A/D converter re-
quires microcontroller attention, their corresponding in-
terrupt will enforce a temporary suspension of the main
program allowing the microcontroller to direct attention
to their respective needs. The device contains a single
external interrupt and several internal interrupts func-
tions. The external interrupt is controlled by the action of
the external INT pin, while the internal interrupts are
controlled by the Timer/Event Counter overflows and
the A/D converter interrupt.
V
V
DD voltage, this gives a single bit analog input value of
DD/256. The following graphs show the ideal transfer
function between the analog input value and the digit-
ised output value for the A/D converters.
Note that to reduce the quantisation error, a 0.5 LSB off-
set is added to the A/D Converter input. Except for the
digitised zero value, the subsequent digitised values will
change at a point 0.5 LSB below where they would
change without the offset, and the last full scale digitised
value will change at a point 1.5 LSB below the VDD level.
1
.
5
L
S
B
F
F
H
F
E
H
F
D
H
A
/
D
C
o
n
v
e
r
s
i
o
n
R
e
s
u
l
t
0
.
5
L
S
B
0
0
0
3
2
1
H
H
H
V
D
D
(
)
2
5
6
0
1
2
3
2
5
3
2
5
4
2
5
5
2
5
6
A
n
a
l
o
g
I
n
p
u
t
V
o
l
t
a
g
e
Ideal A/D Transfer Function
b
7
b
0
A
D
F
T
0
F
E
I
F
E
A
D
I
E
T
0
I
E
E
I
E
M
I
I
N
T
C
0
R
e
g
i
s
t
e
r
M
a
s
t
e
r
I
n
t
e
r
r
u
p
t
G
l
o
b
a
l
E
n
a
b
l
e
1
0
:
:
g
g
l
l
o
o
b
b
a
l
l
e
n
a
b
l
e
a
d
i
s
a
b
l
e
E
x
t
e
r
n
a
l
I
n
t
e
r
r
u
p
t
E
n
a
b
l
e
1
0
:
:
e
d
n
i
a
b
l
e
s
a
b
l
v
e
T
i
m
e
r
a
/
E
e
n
t
C
o
u
n
t
e
r
I
n
t
e
r
r
u
p
t
E
n
a
b
l
e
1
0
:
:
e
d
n
i
b
l
e
s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