The Philips 83C576/87C576 is a high-performance microcontroller
fabricated with Philips high-density CMOS technology. The Philips
CMOS technology combines the high speed and density
characteristics of HMOS with the low power attributes of CMOS.
Philips epitaxial substrate minimizes latch-up sensitivity.
The 8XC576 contains an 8k × 8 ROM (83C576) EPROM (87C576),
a 256 × 8 RAM, 32 I/O lines, three 16-bit counter/timers, a
Programmable Counter Array (PCA), a 10-bit, 6 channel A/D,
2 PWM outputs, an 8-bit UPI interface, a fifteen-source, two-priority
level nested interrupt structure, an enhanced UART, four analog
comparators, power-fail detect and oscillator fail detect circuits, and
on-chip oscillator and clock circuits.
In addition, the 8XC576 has a low active reset, and a software reset.
There is also a fully configurable watchdog timer, and internal power
on clear circuit. The part includes idle mode and power-down mode
states for reduced power consumption.
ORDERING INFORMATION
ROMEPROM
P83C576EBPNP87C576EBPNOTP0 to +70, 40-Pin Plastic Dual In-line Package16SOT129-1
P83C576EBAAP87C576EBAAOTP0 to +70, 44-Pin Plastic Leaded Chip Carrier16SOT187-2
P83C576EBBBP87C576EBBBOTP0 to +70, 44-Pin Plastic Quad Flat Pack16SOT307-2
P83C576EFPNP87C576EBPNOTP–40 to +85, 40-Pin Plastic Dual In-line Package16SOT129-1
P83C576EFAAP87C576EFAAOTP–40 to +85, 44-Pin Plastic Leaded Chip Carrier16SOT187-2
P83C576EFBBP87C576EFBBOTP–40 to +85, 44-Pin Plastic Quad Flat Pack16SOT307-2
P83C576EHPNP87C576EHPNOTP–40 to +125, 40-Pin Plastic Dual In-line Package16SOT129-1
P83C576EHAAP87C576EHAAOTP–40 to +125, 44-Pin Plastic Leaded Chip Carrier16SOT187-2
P83C576EHBBP87C576EHBBOTP–40 to +125, 44-Pin Plastic Quad Flat Pack16SOT307-2
P0.0-0.739-32 43-36 37-30I/OPort 0: Port 0 is a bidirectional I/O port. Port 0 is also the multiplexed low-order address and
P1.0-P1.53-85-942-44
P2.0-P2.721-28 24-31 18-25I/OPort 2: Port 2 is an 8-bit bidirectional I/O port. Port 2 emits the high-order address byte
DIPLCCQFPTYPE NAME AND FUNCTION
202216IGround: 0V reference.
404438IPower Supply: This is the power supply voltage for normal, idle, and power-down operation.
data bus during accesses to external program and data memory (see Note 5). In this
application, it uses strong internal pull-ups when emitting 1s. Port 0 also receives code bytes
during parallel EPROM programming and outputs code bytes during verification. External
pull-ups are required during program verification. During reset, the port register is loaded
with 1’s. Port 0 has 4 output modes selected on a per bit basis by writing to the P0M1 and
P0M2 Special Function Registers as follows:
P0M1.xP0M2.xMode Description
00Open drain (default). See Note 1.
01W eak pullup. See Note 2.
10High impedance. See Note 3.
11Push-pull. See Note 4.
Port 0 is also the data I/O port for the Universal Peripheral Interface (UPI). When the UPI is
enabled, port 0 must be configured as High-Z by the user. Input/Output through P0 is
controlled by pin CS
I/OPort 1: Port 1 is a 6-bit bidirectional I/O port with Schmitt trigger inputs. Port 1 receives the control
signals during program memory verification and parallel EPROM programming. During reset, port
1 is configured as a high impedance analog input port. Digital push-pull outputs are enabled by
writing 1’s to the P1M1 register. The programmer must take care to prevent digital outputs from
switching while an A/D conversion is in progress. Port 1 has 3 output modes selected on a per bit
basis by writing to the P1M1 and P1M2 special function registers as follows:
P1M1.XP1M2.XMode Description
00A/D only. (High impedance)
01Digital input only. High impedance (default).
1XPush-pull.
Port 1 pins also serve alternate functions as follows:
during accesses to external program and data memory that use 16-bit addresses (MOVX
@DPTR) (see Note 5). In this application, it uses strong internal pull-ups when emitting 1s.
Port 2 receives the high-order address byte during program verification and parallel EPROM
programming. During reset, the port 2 pullups are turned on synchronously, and the port
register is loaded with 1’s. Port 2 has the following output modes which can be selected on a
per bit basis by writing to P2M1 and P2M0:
P2M1.XP2M2.XMode Description
00Open drain. See Note 1.
01W eak pullup (default). See Note 2.
10High impedance. See Note 3.
11Push-pull. See Note 4.
Port 2 pins serve alternate functions as follows:
, WR, RD, and A0. Output is push-pull when enabled.
RST9104IReset: A low on this pin synchronously resets all port pins to a high state. The pin must be
ALE/PROG303327I/OAddress Latch Enable/Program Pulse: Output pulse for latching the low byte of the address
PSEN293226OProgram Store Enable: The read strobe to external program memory. When the device is
EA/V
PP
XTAL1192115ICrystal 1: Input to the inverting oscillator amplifier and input to the internal clock generator
XTAL2182014OCrystal 2: Output from the inverting oscillator amplifier.
NOTES:
1. When Open Drain mode is selected, ports 0 and 2 have weak pulldowns to guarantee positive leakage current (see DC electrical
characteristic I
2. When Weak Pullup mode is selected, ports bits that have 1’s written to them can be used as inputs but will source current when externally
pulled low (see DC electrical characteristic IIL).
3. When High Impedance mode is selected, all pullups and pulldowns are turned off. The only current sourced or sunk by the pin is the
parasitic leakage current (see DC electrical characteristic I
4. When Push-Pull mode is selected, strong pullups are on continuously when emitting 1’s (see DC electrical characteristic V
5. When Open-Drain, Weak Pull-up, or Push-pull mode is selected.
1240IA/D positive power supply
CC
2341IA/D 0V reference
SS
I/OPort 3: Port 3 is an 8-bit bidirectional I/O port. Port 3 pins that have 1s written to them can
13-195,7-13
be used as inputs but will source current when externally pulled low (see DC Electrical
Characteristics: I
high until written to by software. Port 3 has the following output modes which can be
). During reset all pins will be synchronously driven high and will remain
IL
selected on a per bit basis by writing to P3M1 and P3M2:
P3M1.XP3M2.XMode Description
00Open drain. See Note 1.
01W eak pullup (default). See Note 2.
10High impedance. See Note 3.
11Push-pull. See Note 4.
Port 3 pins serve alternate functions as follows:
10115IP3.0RxDSerial receive port
11137OP3.1TxDSerial transmit port (enabled only when transmitting serial data)
12148IP3.2INT0External interrupt 0
CMP3+ Comparator 3 positive input
13159IP3.3INT1External interrupt 1
CMP2+ Comparator 2 positive input
141610IP3.4T0Timer/counter 0 input
CMP1+ Comparator 1 positive input
151711IP3.5T1Timer/counter 1 input
CMPR– Common reference to comparators 1, 2, 3
161812OP3.6WRExternal data memory write strobe
CMP0+ Comparator 0 positive input
171913OP3.7RDExternal data memory read strobe
CMP0– Comparator 0 negative input
held low with the oscillator running for 24 oscillator cycles to initialize the internal registers.
An internal diffused resistor to V
capacitor to V
with a slow rising input voltage.
. RST has a Schmitt trigger input stage to provide additional noise immunity
SS
permits a power on reset using only an external
CC
during an access to external memory. In normal operation, ALE is emitted at a constant rate
of 1/6 the oscillator frequency, and can be used for external timing or clocking. Note that
one ALE pulse is skipped during each access to external data memory. ALE is switched off
if the bit 0 in the AUXR register (8EH) is set. This pin is also the program pulse input
(PROG
) during parallel EPROM programming. (See also I n t e r n a l Re s e t o n pa g e 2 4. )
executing code from the external program memory, PSEN
cycle, except that two PSEN
memory. PSEN
is not activated during fetches from internal program memory.
activations are skipped during each access to external data
313529IExternal Access Enable/Programming Supply Voltage: EA must be externally held low
to enable the device to fetch code from external program memory locations 0000H to
1FFFH. If EA
is held high, the device executes from internal program memory unless the
program counter contains an address greater than 1FFFH. This pin also receives the
12.75V programming supply voltage (V
voltage during reset the device enters the in-circuit programming mode.
* SFRs are bit addressable.
# SFRs are modified from or added to the 80C51 SFRs.
1. Reset value depends on reset source.
The 8XC576 has a number of failure detect circuits to prevent
abnormal operating conditions. these failure detect circuits generate
resets as shown in Figure 1.
Watchdog Timer Reload
POWER ON CLEAR / POWER ON FLAG
An on-chip Power On Detect Circuit resets the 8XC576 and sets the
Power Off Flag (PCON.4) on power up or if V
momentarily. The POF can only be cleared by software. The RST
pin is not driven by the power on detect circuit. The POF can be
read by software to determine that a power failure has occurred and
can also be set by software.
LOW VOLTAGE DETECT
An on-chip Low Voltage Detect circuit sets the Low Voltage Flag
(PCON.3) if V
Characteristics) and resets the 8XC576 if the Low Voltage Reset
Enable bit (WDCON.4) is set. If the LVRE is cleared, the reset is
disabled but LVF will still be set if V
driven by the low voltage detect circuit. The LVF can be read by
software to determine that V
cleared by software.
drops below V
CC
LOW
was low. The LVF can be set or
CC
OSCILLATOR FAIL DETECT
An on-chip Oscillator Fail Detect circuit sets the Oscillator Fail Flag
(PCON.5) if the oscillator frequency drops below OSCF for one or
more cycles (see AC Electrical Characteristics: OSCF) and resets
the 8XC576 if the Oscillator Fail Reset Enable bit (WDCON.3) is set.
If OFRE is cleared, the reset is disabled but OSF will still be set if
the oscillator fails. The RST pin is not driven by the oscillator fail
detect circuit. The OSF can be read by software to determine that
an oscillator failure has occurred. The OSF can be set or cleared by
software.
C4HPRE2PRE1PRE0LVREOFREDPD
C1H00H
LOW ACTIVE RESET
One of the most notable features on this part is the low active reset.
The low active reset operates exactly the same as high active reset
with the exception that the part is put into the reset mode by
applying a low level to the reset pin. For power-on reset it is also
necessary to invert the power-on reset circuit; connecting the 8.2K
resistor from the reset pin to V
drops to zero
CC
(see DC Electrical
is low. The RST pin is not
CC
reset pin to ground. Figure 1 shows the reset related circuitry.
When reset the port pins on the 8XC576 are driven high
synchronously.
The 8XC576 also has Low voltage detection circuitry that will, if
enabled, force the part to reset when V
set level. Low Voltage Reset is enabled by a normal reset. Low
Voltage Reset can be disabled by clearing LVRE (bit 4 in the
WDCON SFR) then executing a watchdog feed sequence (A5H to
WFEED1 followed immediately by 5AH to WFEED2). In addition
there is a flag (LVF) that is set if a low voltage condition is detected.
The LVF flag is set even if the Low Voltage detection circuitry is
disabled. Notice that the Low voltage detection circuitry does not
drive the RST# pin so the LVF flag is the only way that the
microcontroller can determine if it has been reset due to a low
voltage condition.
The 8XC576 has an on-chip power-on detection circuit that sets the
POF (PCON.4) flag on power up or if the V
drops to 0V . This flag can be used to determine if the part is being
started from a power-on (cold start) or if a reset has occurred due to
another condition (warm start).
The 8XC576 can be reset in software by setting the RST bit of the
AUXR register (AUXR.3). See Figure 1 for reset diagram.
The 8XC576 has four on-chip timers.
Timers 0 and 1 are identical in every way to Timers 0 and 1 on the
80C51.
Timer 2 on the 8XC576 is identical to the 80C52 Timer 2 (described
in detail in the 80C52 overview) with the exception that it is an up or
down counter. To configure the Timer to count down the DCEN bit in
the T2MOD special function register must be set and a low level
must be present on the T2EX pin (P1.1).
The Pulse Width Modulator (PWM) system can be used as a timer
by disabling its outputs and monitoring its counter overflow flag, the
PWMF bit in the PWCON register (see the PWM section for details).
The Watchdog timer operation and implementation is similar to the
8XC550 (for additional information see the 8XC550 datasheet) with
the exception that the reset values of the WDCON and WDL special
function registers have been changed. The changes in these
registers cause the watchdog timer to be enabled with a timeout of
16384 × T
when the part is reset. The watchdog can be disabled
OSC
by executing a valid feed sequence and then clearing WDRUN (bit 2
in the WDCON SFR). In timer mode, the timer is controlled by
toggling the WDRUN bit. The timeout flag, WDTOF, is set when the
timer overflows and must be cleared in software.
PROGRAMMABLE COUNTER ARRAY (PCA)
The Programmable Counter Array is a special Timer that has five
16-bit capture/compare modules associated with it. Each of the
modules can be programmed to operate in one of four modes: rising
and/or falling edge capture, software timer, high-speed output, or
pulse width modulator . Each module has a pin associated with it in
port 2. Module 0 is connected to P2.0(CEX0), module 1 to
P2.1(CEX1), etc. The basic PCA configuration is shown in Figure 2.
The PCA timer is a common time base for all five modules and can
be programmed to run at: 1/12 the oscillator frequency, 1/4 the
oscillator frequency , the Timer 0 overflow, or the input on the ECI pin
(P2.7). The timer count source is determined from the CPS1 and
CPS0 bits in the CMOD SFR as follows (see Figure 3):
CPS1 CPS0 PCA Timer Count Source
001/12 oscillator frequency
011/4 oscillator frequency
10Timer 0 overflow
11External Input at ECI pin (P2.7)
In the CMOD SFR are three additional bits associated with the PCA.
They are CIDL which allows the PCA to stop during idle mode,
WDTE which enables or disables the watchdog function on
module 4, and ECF which when set causes an interrupt and the
PCA overflow flag CF (in the CCON SFR) to be set when the PCA
timer overflows. These functions are shown in Figure 3.
The watchdog timer function is implemented in module 4 as
implemented in other parts that have a PCA that are available on the
market. However, if a watchdog timer is required in the target
application, it is recommended to use the hardware watchdog timer
that is implemented on the 87C576 separately from the PCA (see
Figure 15).
The CCON SFR contains the run control bit for the PCA and the
flags for the PCA timer (CF) and each module (refer to Figure 6). To
run the PCA the CR bit (CCON.6) must be set by software. The
PCA is shut off by clearing this bit. The CF bit (CCON.7) is set when
the PCA counter overflows and an interrupt will be generated if the
ECF bit in the CMOD register is set, The CF bit can only be cleared
by software. Bits 0 through 4 of the CCON register are the flags for
the modules (bit 0 for module 0, bit 1 for module 1, etc.) and are set
by hardware when either a match or a capture occurs. These flags
also can only be cleared by software. The PCA interrupt system
shown in Figure 4.
Each module in the PCA has a special function register associated
with it. These registers are: CCAPM0 for module 0, CCAPM1 for
module 1, etc. (see Figure 7). The registers contain the bits that
control the mode that each module will operate in. The ECCF bit
(CCAPMn.0 where n=0, 1, 2, 3, or 4 depending on the module)
enables the CCF flag in the CCON SFR to generate an interrupt
when a match or compare occurs in the associated module. PWM
(CCAPMn.1) enables the pulse width modulation mode. The TOG
bit (CCAPMn.2) when set causes the CEX output associated with
the module to toggle when there is a match between the PCA
counter and the module’s capture/compare register. The match bit
MAT (CCAPMn.3) when set will cause the CCFn bit in the CCON
register to be set when there is a match between the PCA counter
and the module’s capture/compare register.
The next two bits CAPN (CCAPMn.4) and CAPP (CCAPMn.5)
determine the edge that a capture input will be active on. The CAPN
bit enables the negative edge, and the CAPP bit enables the
positive edge. If both bits are set both edges will be enabled and a
capture will occur for either transition. The last bit in the register
ECOM (CCAPMn.6) when set enables the comparator function.
Figure 8 shows the CCAPMn settings for the various PCA functions.
There are two additional registers associated with each of the PCA
modules. They are CCAPnH and CCAPnL and these are the
registers that store the 16-bit count when a capture occurs or a
compare should occur. When a module is used in the PWM mode
these registers are used to control the duty cycle of the output.
PCA Capture Mode
To use one of the PCA modules in the capture mode either one or
both of the CCAPM bits CAPN and CAPP for that module must be
set. The external CEX input for the module (on port 2) is sampled for
a transition. When a valid transition occurs the PCA hardware loads
the value of the PCA counter registers (CH and CL) into the
module’s capture registers (CCAPnL and CCAPnH). If the CCFn bit
for the module in the CCON SFR and the ECCFn bit in the CCAPMn
SFR are set then an interrupt will be generated. Refer to Figure 9.
16-bit Software Timer Mode
The PCA modules can be used as software timers by setting both
the ECOM and MAT bits in the modules CCAPMn register. The PCA
timer will be compared to the module’s capture registers and when a
match occurs an interrupt will occur if the CCFn (CCON SFR) and
the ECCFn (CCAPMn SFR) bits for the module are both set (see
Figure 10).
High Speed Output Mode
In this mode the CEX output (on port 2) associated with the PCA
module will toggle each time a match occurs between the PCA
counter and the module’s capture registers. To activate this mode
the TOG, MAT, and ECOM bits in the module’s CCAPMn SFR must
be set (see Figure 11).
Pulse Width Modulator Mode
All of the PCA modules can be used as PWM outputs. Figure 12
shows the PWM function. The frequency of the output depends on
the source for the PCA timer. All of the modules will have the same
frequency of output because they all share the PCA timer. The duty
cycle of each module is independently variable using the module’s
capture register CCAPLn. When the value of the PCA CL SFR is
less than the value in the module’s CCAPLn SFR the output will be
low, when it is equal to or greater than the output will be high. When
CL overflows from FF to 00, CCAPLn is reloaded with the value in
CCAPHn. the allows updating the PWM without glitches. The PWM
and ECOM bits in the module’s CCAPMn register must be set to
enable the PWM mode.
PCA Interrupt System
The PCA on most 80C51 family devices provides a single interrupt
source, EC (IE.6). The 8xC576 expands the flexibility of the PCA by
providing additional interrupt sources for each of the five PCA
modules, EC0 (IE1.0) through EC4 (IE1.4), in addition to the original
interrupt source EC (IE.6). Any of these sources can be enabled at
any time. It is possible for both a module source (EC0 through EC4)
to be enabled at the same time that the single source, EC, is
enabled. In this case, a module event will generate an interrupt for
both the module source and the single source, EC.
CIDLCounter Idle control: CIDL = 0 programs the PCA Counter to continue functioning during idle Mode.
CIDL = 1 programs it to be gated off during idle.
WDTEWatchdog Timer Enable: WDTE = 0 disables Watchdog Timer function on PCA Module 4. WDTE = 1 enables it.
–Not implemented, reserved for future use.*
CPS1 PCA Count Pulse Select bit 1.
CPS0PCA Count Pulse Select bit 0.
CPS1CPS0Selected PCA Input**
000Internal clock, f
011Internal clock, f
OSC
OSC
÷ 12
÷ 4
102Timer 0 overflow
113External clock at ECI/P2.7 pin (max. rate = f
OSC
÷ 8)
ECFPCA Enable Counter Overflow interrupt:
ECF = 1 enables CF bit in CCON to generate an interrupt. ECF = 0 disables that function of CF.
NOTE:
* User software should not write 1s to reserved bits. These bits may be used in future 8051 family products to invoke new features. In that case, the reset or inactive value of the
new bit will be 0, and its active value will be 1. The value read from a reserved bit is indeterminate.
= oscillator frequency
** –f
OSC
SU00686A
Figure 5. CMOD: PCA Counter Mode Register
CCON Address = OD8H
Reset Value = 00X0 0000B
Bit Addressable
CFCR–CCF4CCF3CCF2CCF1CCF0
Bit:
76543210
SymbolFunction
CFPCA Counter Overflow flag. Set by hardware when the counter rolls over. CF flags an interrupt if bit ECF in CMOD is
set. CF may be set by either hardware or software but can only be cleared by software.
CRPCA Counter Run control bit. Set by software to turn the PCA counter on. Must be cleared by software to turn the PCA
counter off.
–Not implemented, reserved for future use*.
CCF4PCA Module 4 interrupt flag. Set by hardware when a match or capture occurs. Must be cleared by software.
CCF3PCA Module 3 interrupt flag. Set by hardware when a match or capture occurs. Must be cleared by software.
CCF2PCA Module 2 interrupt flag. Set by hardware when a match or capture occurs. Must be cleared by software.
CCF1PCA Module 1 interrupt flag. Set by hardware when a match or capture occurs. Must be cleared by software.
CCF0PCA Module 0 interrupt flag. Set by hardware when a match or capture occurs. Must be cleared by software.
NOTE:
* User software should not write 1s to reserved bits. These bits may be used in future 8051 family products to invoke new features. In that case, the reset or inactive value of the
new bit will be 0, and its active value will be 1. The value read from a reserved bit is indeterminate.
SymbolFunction
–Not implemented, reserved for future use*.
ECOMnEnable Comparator. ECOMn = 1 enables the comparator function.
CAPPnCapture Positive, CAPPn = 1 enables positive edge capture.
CAPNnCapture Negative, CAPNn = 1 enables negative edge capture.
MATnMatch. When MATn = 1, a match of the PCA counter with this module’s compare/capture register causes the CCFn bit
TOGnToggle. When TOGn = 1, a match of the PCA counter with this module’s compare/capture register causes the CEXn
PWMnPulse Width Modulation Mode. PWMn = 1 enables the CEXn pin to be used as a pulse width modulated output.
ECCFnEnable CCF interrupt. Enables compare/capture flag CCFn in the CCON register to generate an interrupt.
NOTE:
*User software should not write 1s to reserved bits. These bits may be used in future 8051 family products to invoke new features. In that case, the reset or inactive value of the new
bit will be 0, and its active value will be 1. The value read from a reserved bit is indeterminate.
X0000000No operation
XX10000X16-bit capture by a positive-edge trigger on CEXn
XX01000X16-bit capture by a negative trigger on CEXn
XX11000X16-bit capture by a transition on CEXn
X100100X16-bit Software Timer
X100110X16-bit High Speed Output
X10000108-bit PWM
X1001X0XWatchdog Timer
Figure 8. PCA Module Modes (CCAPMn Register)
1998 Jun 04
14
Loading...
+ 32 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.