
Rev. 1.40
84
March 29, 2019
Rev. 1.40
85
March 29, 2019
HT45F23A/HT45F24A
TinyPower
TM
Flash MCU with OPA & Comparators
HT45F23A/HT45F24A
TinyPower
TM
Flash MCU with OPA & Comparators
Controlling the power on/off function of the A/D converter circuitry is implemented using the
ADONB bit in the ACSR register. This bit must be zero to power on the A/D converter. When the
ADONB bit is cleared to zero to power on the A/D converter internal circuitry a certain delay, as
indicated in the timing diagram, must be allowed before an A/D conversion is initiated. Even if no
pins are selected for use as A/D inputs by clearing the PCR7~PCR0 bits in the ADPCR register, if
the ADONB bit is zero then some power will still be consumed. In power conscious applications it
is therefore recommended that the ADONB is set high to reduce power consumption when the A/D
converter function is not being used.
The reference voltage supply to the A/D Converter can be supplied from either the positive power
supply pin, VDD, or from an external reference sources supplied on pin VREF. The desired selection
is made using the VRSEL bit. As the VREF pin is pin-shared with other functions, when the VRSEL
bit is set high, the VREF pin function will be selected and the other pin functions will be disabled
automatically.
A/D Input Pins
The A/D analog input pins are pin-shared with the I/O pins on Port B Port C and Port D as well as
other functions. The PCR7~ PCR0 bits in the ADPCR register, determine whether the input pins
are setup as A/D converter analog inputs or whether they have other functions. If the PCR7~ PCR0
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 PBC or PCC or PDC
port control register to enable the A/D input as when the PCR7~ PCR0 bits enable an A/D input, the
status of the port control register will be overridden.
A/D Input Structure
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 VRSEL bit in the ACSR
register. The analog input values must not be allowed to exceed the value of VREF.