AT89LP428-20MU ATMEL [ATMEL Corporation], AT89LP428-20MU Datasheet - Page 58

no-image

AT89LP428-20MU

Manufacturer Part Number
AT89LP428-20MU
Description
8-bit Microcontroller with 4K/8K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
12.3.3
58
AT89LP428/828
Dual Slope Counter
The timer overflow/underflow rate for up-down counting mode is the same as for up counting
mode, provided that the count direction does not change. Changes to the count direction may
result in longer or shorter periods between time-outs.
Figure 12-5. Timer 2 Waveform: Auto-reload Mode (DCEN = 1)
When Timer 2 Auto-reload mode uses Count Mode 2 (T2CM
(T2CM
MIN to TOP and then counts down from TOP to MIN, following a sawtooth waveform as shown
in
(Up = 0 and Down = 1). The value of TOP stored in RCAP2H and RCAP2L is double-buffered
such that a new TOP value takes affect only after an underflow. The only difference between
Mode 2 and Mode 3 is when the interrupt flag is set. In Mode 2, TF2 is set once per count period
when the timer underflows at MIN. In Mode 3, TF2 is set twice per count period, once when the
timer overflows at TOP and once when the timer underflows at MIN. The interrupt service routine
can check the EXF2 bit to determine if TF2 was set at TOP or MIN. These count modes are pro-
vided to support variable precision symmetrical PWM in the CCA. DCEN has no effect when
using dual slope operation. The Timer 2 overflow rate for this mode is given in the following
equation:
DCEN = 0, T2CM = 10B
Figure
Auto-Reload Mode:
1-0
Bottom
12-6. The EXF2 bit is set/cleared by hardware to reflect the current count direction
T2EX
EXF2
= 11B), the timer operates in a dual slope fashion. The timer counts up from
Max
Max
Top
Min
Min
Time-out Period
T2CM
T2CM
1-0
1-0
=
= 00B, DCEN = 1
= 01B, DCEN = 1
{
------------------------------------------------------------------ -
RCAP2H RCAP2L
Oscillator Frequency
,
1-0
= 10B) or Count Mode 3
}
×
2
×
TF2 Set
TF2 Set
(
TPS
3654A–MICRO–8/09
+
1
)

Related parts for AT89LP428-20MU