P87LPC762 Philips Semiconductors, P87LPC762 Datasheet - Page 31

no-image

P87LPC762

Manufacturer Part Number
P87LPC762
Description
Low power/ low price/ low pin count 20 pin microcontroller with 2 kbyte OTP
Manufacturer
Philips Semiconductors
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
P87LPC762BD
Manufacturer:
PHILIPS/飞利浦
Quantity:
20 000
Part Number:
P87LPC762BDH
Manufacturer:
IBM
Quantity:
191
Part Number:
P87LPC762BDH
Manufacturer:
PHILIPS/飞利浦
Quantity:
20 000
Part Number:
P87LPC762BDHЈ¬512
Manufacturer:
NXP
Quantity:
12 525
Part Number:
P87LPC762BDЈ¬512
Manufacturer:
PH3
Quantity:
26 410
Part Number:
P87LPC762BN
Manufacturer:
INFINEON
Quantity:
17 662
Part Number:
P87LPC762BN
Manufacturer:
PHILIPS/飞利浦
Quantity:
20 000
Company:
Part Number:
P87LPC762BN
Quantity:
1 400
Company:
Part Number:
P87LPC762BN
Quantity:
200
Part Number:
P87LPC762BNЈ¬112
Manufacturer:
NXP
Quantity:
630
Part Number:
P87LPC762DH
Manufacturer:
PHILIPS/飞利浦
Quantity:
20 000
Part Number:
P87LPC762FN
Manufacturer:
NXP/恩智浦
Quantity:
20 000
Philips Semiconductors
Timer/Counters
The 87LPC762 has two general purpose counter/timers which are
upward compatible with the standard 80C51 Timer 0 and Timer 1.
Both can be configured to operate either as timers or event counters
(see Figure 22). An option to automatically toggle the T0 and/or T1
pins upon timer overflow has been added.
In the “Timer” function, the register is incremented every machine
cycle. Thus, one can think of it as counting machine cycles. Since a
machine cycle consists of 6 CPU clock periods, the count rate is 1/6
of the CPU clock frequency. Refer to the section Enhanced CPU for
a description of the CPU clock.
In the “Counter” function, the register is incremented in response to
a 1-to-0 transition at its corresponding external input pin, T0 or T1.
In this function, the external input is sampled once during every
2001 Oct 26
Low power, low price, low pin count (20 pin)
microcontroller with 2 kbyte OTP
TMOD
TMOD.6
TMOD.2
BIT
TMOD.7
TMOD.5, 4
TMOD.3
TMOD.1, 0
Address: 89h
Not Bit Addressable
SYMBOL
M1, M0
M1, M0
M1, M0
GATE
GATE
C/T
C/T
0 0
0 1
1 0
1 1
GATE
7
FUNCTION
Gating control for Timer 1. When set, Timer/Counter is enabled only while the INT1 pin is high and
the TR1 control pin is set. When cleared, Timer 1 is enabled when the TR1 control bit is set.
Timer or Counter Selector for Timer 1. Cleared for Timer operation (input from internal system clock.)
Set for Counter operation (input from T1 input pin).
Mode Select for Timer 1 (see table below).
Gating control for Timer 0. When set, Timer/Counter is enabled only while the INT0 pin is high and
the TR0 control pin is set. When cleared, Timer 0 is enabled when the TR0 control bit is set.
Timer or Counter Selector for Timer 0. Cleared for Timer operation (input from internal system clock.)
Set for Counter operation (input from T0 input pin).
Mode Select for Timer 0 (see table below).
Timer Mode
8048 Timer “TLn” serves as 5-bit prescaler.
16-bit Timer/Counter “THn” and “TLn” are cascaded; there is no prescaler.
8-bit auto-reload Timer/Counter. THn holds a value which is loaded into TLn when it overflows.
Timer 0 is a dual 8-bit Timer/Counter in this mode. TL0 is an 8-bit Timer/Counter controlled by the
standard Timer 0 control bits. TH0 is an 8-bit timer only, controlled by the Timer 1 control bits (see
text). Timer 1 in this mode is stopped.
Figure 22. Timer/Counter Mode Control Register (TMOD)
C/T
6
T1
M1
5
M0
4
28
GATE
maximum count rate is 1/6 of the CPU clock frequency. There are no
3
machine cycle. When the samples of the pin state show a high in
one cycle and a low in the next cycle, the count is incremented. The
new count value appears in the register during the cycle following
the one in which the transition was detected. Since it takes 2
machine cycles (12 CPU clocks) to recognize a 1-to-0 transition, the
restrictions on the duty cycle of the external input signal, but to
ensure that a given level is sampled at least once before it changes,
it should be held for at least one full machine cycle.
The “Timer” or “Counter” function is selected by control bits C/T in
the Special Function Register TMOD. In addition to the “Timer” or
“Counter” selection, Timer 0 and Timer 1 have four operating
modes, which are selected by bit-pairs (M1, M0) in TMOD. Modes 0,
1, and 2 are the same for both Timers/Counters. Mode 3 is different.
The four operating modes are described in the following text.
C/T
2
T0
M1
1
M0
0
87LPC762
Reset Value: 00h
SU01171
Preliminary data

Related parts for P87LPC762