
KING BILLION ELECTRONICS CO., LTD
駿
億
電
子
股
份
有
限
公
司
HE8P160E
HE80000 Series
7
Preliminary V1.3E
by 4 or divided by 2. If fast clock is greater than 8 MHz, then set ADC[3]=0, otherwise set
ADC[3]=1. The ADC[2:0] is used to select one of the 7 ADC input signal channel, there is only one
channel selected at the same time.
Address
Name
Function
0ch: (PRTC)
ADC
ADC control/data register
ADC Control Register (Write Bit Field)
0: ADC enable
ADC[7]
ENB
1: ADC disable; Power-down
ADC[6]
Start
0 -> 1: S/W start a ADC conversion
0: select T2 interrupt as "start of conversion"
ADC[5]
SELTM
1: select ADC[6]'s rising edge as "start of conversion"
0: ADC read value = { data[3:0], 0, 0, 0, 0 },
High nibble= data[3:0]; low nibble= ”0000”.
ADC[4]
DATASEL
1: ADC read value = data[11:4]
0: ADC Clock= fast clock /4, (Clock > 8MHz )
ADC[3]
CLKS
1: ADC Clock = fast clock /2, (Clock < 8MHz )
ADC[2:0]
CHNL
7~0: select ADC input channel 7~0
ADC Data Register (Read Bit Field)
ADC[7:0]
data[11:4], or { data[3:0], 0, 0 ,0, 0 }
Following program is a ADC sample data example, please reference.
Timer2::
:
; ADC section
; Use ADC channel: PC7
da
#00111111b
sta PRT17
; write ADC Control Register
da
PRT17
; Get result[11..4] from Result Register
sta
MemA
; Store in “Memory Location A”
da #00101111b
sta PRT17
; write ADC Control Register
da
PRT17
; Get result[3..0] from Result Register
sta
MemB
; Store in “Memory Location B”
; END ADC sectio
eti
R/W Width
R/W
Reset
ZZZZZZZZ
8