SN8P275X Series
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 143
Version 0.7
12.2 DAM REGISTER
DAM initial value = 0000 0000
0B0H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
DAM
DAENB DAB6 DAB5 DAB4 DAB3 DAB2 DAB1 DAB0
Read/Write R/W
R/W
R/W R/W R/W R/W R/W R/W
After
reset
0 0 0 0 0 0 0 0
Bit 7
DAENB:
Digital to Analog converter control bit.
0 = disable
1 = enable
Bit [6:0]
DAB [6:0]:
Digital input data.
12.3 D/A CONVERTER OPERATION
When the DAENB = 0, the DAO pin is output floating status. After setting DAENB to “1”, the DAO output value is
controlled by DAB bits.
¾
Example: Output 1/2 VDD from DAO pin.
MOV
A,
#00111111B
B0MOV
DAM, A
; Set DAB to a half of the full scale.
B0BSET
FDAENB
; Enable D/A function.
The DAB’s data v.s. DAO’s output voltage as following:
DAB6 DAB5 DAB4 DAB3 DAB2 DAB1 DAB0
DAO
0 0 0 0 0 0 0
VSS
0 0 0 0 0 0 1
Idac
0 0 0 0 0 1 0
2
*
Idac
0 0 0 0 0 1 1
3
*
Idac
. . . . . . .
.
. . . . . . .
.
. . . . . . .
.
1 1 1 1 1 1 0 126
*
Idac
1 1 1 1 1 1 1 127
*
Idac
Note:
Idac = I
FSO
/ (2
7
-1) (I
FSO
: Full-scale Output Current).