A/D Input Pins
All of the A/D analog input pins are pin-shared with the I/O pins on Port C as well as other
functions. The ACE7~ACE0 bits in the ACERL registers, determine whether the input pins are setup
as A/D converter analog inputs or whether they have other functions. If the ACE7~ACE0 bits for its
corresponding pin is set high then the pin will be setup to be an A/D converter input and 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 PCC port control register to enable
the A/D input as when the ACE7~ACE0 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 pins, 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.
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, ACS2~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
ACE7~ACE0 bits in the ACERL register.
• 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.21
A/D Flash MCU with EEPROM
A N 0
A C S 4 ~ 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
A V D D
V
P C 6 / V R E F
R E F
A/D Input Structure
11�
HT66F488/HT66F489
A N 7
V
B G
B u f f e r
V 1 2 5 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
�ove��e� ��� 2�1�
Need help?
Do you have a question about the HT66F488 and is the answer not in the manual?