8XC51GB
This pin also receives the 12 75V programming sup-
ply voltage (VPP) during programming (OTP only)
XTAL1 Input to the inverting oscillator amplifier
XTAL2 Output from the inverting oscillator amplifi-
er
A D CONVERTER
The 8XC51GB A D converter has a resolution of 8
bits and an accuracy of g1 LSB (g2 LSB for chan-
nels 0 and 1) The conversion time for a single chan-
nel is 20 ms at a clock frequency of 16 MHz with the
sample and hold function included Independent
supply voltages are provided for the A D Also the
A D operates both in Normal Mode or in Idle Mode
The A D has 8 analog input pins ACH0 (A D CHan-
nel 0) ACH7 1 reference input pin COMPREF
(COMParison REFerence) 1 control input pin TRI-
GIN (TRIGger IN) and 2 power pins AVREF (Volt-
age REFerence) and analog ground (ANalog
GrouND) In addition the A D has 8 conversion re-
sult registers ADRES0 (A D result for channel 0)
ADRES7 1 comparison result register ACMP (Ana-
log Comparison) and 1 control register ACON (A D
Control)
The control bit ACE (A D Conversion Enable) in
ACON controls whether the A D is in operation or
not ACE e 0 idles the A D ACE e 1 enables A D
conversion The control bit AIM (A D Input mode) in
ACON controls the mode of channel selection AIM
e 0 is the Scan Mode and AIM e 1 is the Select
Mode The result registers ADRES4 ADRES7 al-
ways contain the result of a conversion from the cor-
responding channels ACH4 CH7 However the
result registers ADRES0 ADRES3 depend on the
mode selected In the scan mode ADRES0 AD-
RES3 contain the values from ACH0 ACH3 In
the Select Mode one of the four channels ACH0
ACH3 is converted four times and the four values
are stored sequentially in locations ADRES0 AD-
RES3 Its channel is selected by bits ACS1 and
ACS0 (A D Channel Select 1 and 0) in ACON
PROGRAMMABLE COUNTER ARRAYS
The Programmable Counter Arrays (PCA–PCA1) are
each made up of a Counter Module and five Regis-
ter Comparator Modules as shown below The
16-bit output of the counter module is available to all
five Register Comparator Modules providing one
common timing reference Each Register Compara-
tor Module is associated with a pin of Port 1 or Port 4
and is capable of performing input capture output
compare and pulse width modulation functions The
PCAs are exactly the same in function except for the
addition of clock input sources on PCA1
The PCA Counter and five Register Comparator
Modules each have a status bit in the CCON
C1CON Special Function Registers These six
status bits are set according to the selected modes
of operation described below The CCON C1CON
Register provides a convenient means to determine
which of the six PCA PCA1 interrupts has occurred
The EC Bit in the IE (Interrupt Enable) Special Func-
tion Register is a global interrupt enable for the PCA
272337 – 3
Figure 3 Programmable Counter Arrays
OSCILLATOR CHARACTERISTICS
XTAL1 and XTAL2 are the input and output respec-
tively of an inverting amplifier which can be config-
ured for use as an on-chip oscillator as shown in
Figure 4 Either a quartz crystal or ceramic resonator
may be used More detailed information concerning
the use of the on-chip oscillator is available in Appli-
cation Note AP-155 ‘‘Oscillators for Microcontrol-
lers ’’ Order No 230659
To drive the device from an external clock source
XTAL should be driven while XTAL2 floats as
shown in Figure 5 There are no requirements on the
duty cycle of the external clock signal since the in-
put to the internal clocking circuitry is through a di-
vide-by-two flip-flop but minimum and maximum
high and low times specified on the data sheet must
be observed
5