English
Language : 

C8051F58X Datasheet, PDF (332/356 Pages) Silicon Laboratories – Programmable hysteresis and response time Configurble as interrupt or reset source Low current
C8051F58x/F59x
29.1. PCA1 Counter/Timer
The 16-bit PCA1 counter/timer consists of two 8-bit SFRs: PCA1L and PCA1H. PCA1H is the high byte
(MSB) of the 16-bit counter/timer and PCA1L is the low byte (LSB). Reading PCA1L automatically latches
the value of PCA1H into a “snapshot” register; the following PCA1H read accesses this “snapshot” register.
Reading the PCA1L Register first guarantees an accurate reading of the entire 16-bit PCA1 counter.
Reading PCA1H or PCA1L does not disturb the counter operation. The CPS12–CPS10 bits in the
PCA1MD register select the timebase for the counter/timer as shown in Table 29.1.
When the counter/timer overflows from 0xFFFF to 0x0000, the Counter Overflow Flag (CF1) in PCA1MD is
set to logic 1 and an interrupt request is generated if CF1 interrupts are enabled. Setting the ECF1 bit in
PCA1MD to logic 1 enables the CF1 flag to generate an interrupt request. The CF1 bit is not automatically
cleared by hardware when the CPU vectors to the interrupt service routine, and must be cleared by soft-
ware. Clearing the CIDL1 bit in the PCA1MD register allows the PCA1 to continue normal operation while
the CPU is in Idle mode.
Table 29.1. PCA1 Timebase Input Options
CPS12 CPS11 CPS10
Timebase
0
0
0 System clock divided by 12.
0
0
1 System clock divided by 4.
0
1
0 Timer 0 overflow.
0
1
1 High-to-low transitions on ECI1 (max rate = system clock
divided by 4).
1
0
0 System clock.
1
0
1 External oscillator source divided by 8.*
1
1
0 Timer 4 Overflow.
1
1
1 Timer 5 Overflow.
*Note: External oscillator source divided by 8 is synchronized with the system clock.
IDLE
PCA1MD
C
CCCE
I
PPPC
D
SSSF
L
1111
1
210
PCA1CN
CCCCCCCC
FRCCCCCC
11FFFFFF
119876
10
SYSCLK/12
000
SYSCLK/4
001
Timer 0 Overflow
010
ECI1
011
SYSCLK
100
External Clock/8
101
SYSCLK
110
External Clock/8
111
PCA1L
read
Snapshot
Register
To SFR Bus
0
PCA1H
PCA1L
Overflow
To PCA1 Interrupt System
1
CF1
To PCA1 Modules
Figure 29.2. PCA1 Counter/Timer Block Diagram
332
Rev. 1.2