1996 Jun 27 19
Philips Semiconductors Product specification
8-bit microcontroller with on-chip CAN P8xC592
10.1 ADC Control register (ADCON)
Table 13 ADC Control register (address C5H)
Table 14 Description of the ADCON bits
Table 15 ADCI and ADCS operating modes
If ADCI is cleared by software while ADCS is set at the same time a new analog-to-digital conversion with the same
channel-number may be started. It is recommended to reset ADCI before ADCS is set.
Note
1. Start of a new conversion requires ADCI = 0.
76543210
ADC.1 ADC.0 ADEX ADCI ADCS AADR2 AADR1 AADR0
BIT SYMBOL FUNCTION
7 ADC.1 Bit 1 of ADC converted value.
6 ADC.0 Bit 0 of ADC converted value.
5 ADEX Enable external start of conversion by STADC. If ADEX is:
LOW, then conversion cannot be started externally by STADC (only by software by setting ADCS)
HIGH, then conversion can be started externally by a rising edge on STADC or externally.
4 ADCI ADC interrupt flag. This flag is set when an analog-to-digital conversion result is ready to be read.
If enabled, an interrupt is invoked. The flag must be cleared by software.
It cannot be set by software (see Table 15).
3 ADCS ADC start and status. Setting this bit starts an analog-to-digital conversion. It may be set by
software or by the external signal STADC. The ADC logic ensures that this signal is HIGH while the
ADC is busy. On completion of the conversion, ADCS is reset at the same time the interrupt flag
ADCI is set. ADCS can not be reset by software (see Table 15).
2 AADR2 Analog input select. This binary coded address selects one of the eight analog port pins of P5 to be
input to the converter. It can only be changed when ADCI and ADCS are both LOW. AADR2 is the
MSB. (e.g. 100B selects the analog input channel ADC4)
1 AADR1
0 AADR0
ADCI ADCS OPERATION
0 0 ADC not busy, a conversion can be started.
0 1 ADC busy, start of a new conversion is blocked.
1 X (don’t care) Conversion completed; see note 1.
1996 Jun 27 20
Philips Semiconductors Product specification
8-bit microcontroller with on-chip CAN P8xC592
h
andbook, full pagewidth
MGA155
ADC0
ANALOG INPUT
MULTIPLEXER
10-BIT A/D
CONVERTER
ADCON
1234567012345670
STADC
analog reference
supply (analog part)
ground (analog part)
ADCH
INTERNAL BUS
ADC1
ADC2
ADC3
ADC4
ADC5
ADC6
ADC7
Fig.10 Functional diagram of analog input.
1996 Jun 27 21
Philips Semiconductors Product specification
8-bit microcontroller with on-chip CAN P8xC592
11 TIMERS/COUNTERS
The P8xC592 contains:
Three 16-bit timer/event counters:
Timer 0, Timer 1 and Timer T2
One 8-bit timer, T3 (Watchdog WDT).
11.1 Timer 0 and Timer 1
Timer 0 and Timer 1 may be programmed to carry out the
following functions:
Measure time intervals and pulse durations
Count events
Generate interrupt requests.
Timer 0 and Timer 1 can be programmed independently to
operate in 3 modes:
Mode 0 8-bit timer or 8-bit counter each with divide-by-32
prescaler.
Mode 1 16-bit timer-interval or event counter.
Mode 2 8-bit timer-interval or event counter with
automatic reload upon overflow.
Timer 0 can be programmed to operate in an additional
mode as follows:
Mode 3 one 8-bit time-interval or event counter and one
8-bit timer-interval counter.
When Timer 0 is in Mode 3, Timer 1 can be programmed
to operate in Modes 0, 1 or 2 but cannot set an interrupt
flag or generate an interrupt. However, the overflow from
Timer 1 can be used to pulse the Serial Port baud-rate
generator.
The frequency handling range of these counters with a
16 MHz crystal is as follows:
In the timer function, the timer is incremented at a
frequency of 1.33 MHz (
1
12
of the oscillator frequency)
0 Hz to an upper limit of 0.66 MHz (
1
24
of the oscillator
frequency) when programmed for external inputs.
Both internal and external inputs can be gated to the
counter by a second external source for directly measuring
pulse durations. When configured as a counter, the
register is incremented on every falling edge on the
corresponding input pin, T0 or T1.
The earliest moment, when the incremented register value
can be read is during the second machine cycle following
the machine cycle within which the incrementing pulse
occurred.The counters are started and stopped under
software control. Each one sets its interrupt request flag
when it overflows from all HIGHs to all LOWs
(or automatic reload value), with the exception of Mode 3
as previously described.
11.2 Timer T2 Capture and Compare Logic
Timer T2 is a 16-bit timer/counter which has capture and
compare facilities (see Fig.11).
The 16-bit timer/counter is clocked via a prescaler with a
programmable division factor of 1, 2, 4 or 8. The input of
the prescaler is clocked with
1
12
of the oscillator
frequency, or by an external source connected to the T2
input, or it is switched off. The maximum repetition rate of
the external clock source is
1
12
f
CLK
, twice that of Timer 0
and Timer 1. The prescaler is incremented on a rising
edge. It is cleared if its division factor or its input source is
changed, or if the timer/counter is reset.
T2 is readable ‘on the fly’, without any extra read latches;
this means that software precautions have to be taken
against misinterpretation at overflow from least to most
significant byte while T2 is being read. T2 is not loadable
and is reset by the RST signal or at the positive edge of the
input signal RT2, if enabled. In the Idle mode the
timer/counter and prescaler are reset and halted.
T2 is connected to four 16-bit Capture Registers: CT0,
CT1, CT2 and CT3. A rising or falling edge on the inputs
CT0I, CT1I, CT2I or CT3I (alternative function of Port 1)
results in loading the contents of T2 into the respective
Capture Registers and an interrupt request.
Using the Capture Register CTCON, these inputs may
invoke capture and interrupt request on a positive edge, a
negative edge or on both edges. If neither a positive nor a
negative edge is selected for capture input, no capture or
interrupt request can be generated by this input.
The contents of the Compare Registers CM0, CM1 and
CM2 are continually compared with the counter value of
Timer T2. When a match occurs, an interrupt may be
invoked. A match of CM0 sets the bits 0 to 5 of Port 4, a
CM1 match resets these bits and a CM2 match toggles bits
6 and 7 of Port 4, provided these functions are enabled by
the STE/RTE registers. A match of CM0 and CM1 at the
same time results in resetting bits 0 to 5 of Port 4. CM0,
CM1 and CM2 are reset by the RST signal.
Port 4 can be read and written by software without
affecting the toggle, set and reset signals. At a byte
overflow of the least significant byte, or at a 16-bit overflow
of the timer/counter, an interrupt sharing the same
interrupt vector is requested. Either one or both of these
overflows can be programmed to request an interrupt.
All interrupt flags must be reset by software.

P80C592FFA/00,512

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC MCU 8BIT ROMLESS 68PLCC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet