A/D Input Pins
All of the A/D analog input pins are pin-shared with the I/O pins on Port A, Port E, Port F and Port
H as well as other functions. The corresponding selection bits in the PAS0~PAS3, PES3, PFS0
and PHS0 registers, determine whether the input pins are setup as A/D converter analog inputs or
whether they have other functions. If the corresponding pin is setup to be an A/D converter input,
the original pin functions disabled. In this way, pins can be changed under program control to
change their function between A/D inputs and other functions. All pull-high resistors, which are
setup through register programming, will be automatically disconnected if the pins are setup as A/D
inputs. Note that it is not necessary to first setup the A/D pin as an input in the PAC, PEC, PFC or
PHC port control register to enable the A/D input as when the relevant A/D input function selection
bits enable an A/D input, the status of the port control register will be overridden.
The A/D converter has its own reference voltage pin, VREF, however the reference voltage can
also be supplied from the power supply pin, a choice which is made through the VREFS bit in the
ADCR1 register. The analog input values must not be allowed to exceed the value of V
Summary of A/D Conversion Steps
The following summarises the individual steps that should be executed in order to implement an
A/D conversion process.
• Step 1
Select the required A/D conversion clock by correctly programming bits ADCK2~ADCK0 in the
ADCR1 register.
• Step 2
Enable the A/D by clearing the ADOFF bit in the ADCR0 register to zero.
• Step 3
Select which channel is to be connected to the internal A/D converter by correctly programming
the ACS4~ACS0 bits which are also contained in the ADCR1 and ADCR0 register.
• Step 4
Select which pins are to be used as A/D inputs and configure them by correctly programming the
corresponding pin-shared function selection registers.
• Step 5
If the interrupts are to be used, the interrupt control registers must be correctly configured to
ensure the A/D converter interrupt function is active. The master interrupt control bit, EMI, and
the A/D converter interrupt bit, ADE, must both be set high to do this.
Rev. 1.40
A/D Flash MCU with EEPROM
P H 0 / A N
A C S 4 , A C S 2 ~ A C S 0
I n p u t V o l t a g e
V R E F S
1 2 - b i t A D C
V D D
V
P H 0 / V R E F
R E F
A/D Input Structure
154
HT66F60A/HT66F70A
P F 1 / A N 1 1
1 . 2 5 V
B u f f e r
V B G E N
B a n d g a p
R e f e r e n c e
V o l t a g e
����st ��� �01�
.
REF
Need help?
Do you have a question about the HT66F60A and is the answer not in the manual?