TMR1C Register
·
BS83C24-3
Bit
7
6
5
4
3
2
1
0
Name
T1M1
T1M0
T1S
T1ON
T1EG
PFDC
¾
¾
R/W
R/W
R/W
R/W
R/W
R/W
R/W
¾
¾
POR
0
0
0
0
1
0
¾
¾
Bits 7, 6
T1M1, T1M0: Timer 1 operation mode selection
00: no mode available
01: event counter mode
10: timer mode
11: pulse width capture mode
Bit 5
T1S
: timer clock source
0: f
SYS
/4
1: LIRC oscillator
Bit 4
T1ON
: timer/event counter counting enable
0: disable
1: enable
Bit 3
T1EG:
Event counter active edge selection
0: count on rising edge
1: count on falling edge
Pulse Width Capture active edge selection
0: start counting on falling edge, stop on rising edge
1: start counting on raising edge, stop on falling edge
Bit 2
PFDC: I/O or PFD selection Bit
0: I/O
1: PFD
Bits 1, 0
unimplemented, read as
²
0
²
8-Bit Timer/Event Counter Operating Mode
The Timer/Event Counter can be utilised to measure fixed time intervals, providing an internal
interrupt signal each time the Timer/Event Counter overflows. The internal clock is used as the timer
clock. The timer input clock source is either the f
SYS
/4 or the LIRC oscillator. However, this timer clock
source is further divided by a prescaler, the value of which is determined by the bits TPSC2~TPSC0 or
T0PSC2~T0PSC0 in the Timer Control Register. The timer-on bit, TON or T0ON, must be set high to
enable the timer to run. Each time an internal clock high to low transition occurs, the timer increments
by one; when the timer is full and overflows, an interrupt signal is generated and the timer will reload
the value already loaded into the preload register and continue counting. A timer overflow condition
and corresponding internal interrupt is one of the wake-up sources, however, the internal interrupts can
be disabled by ensuring that the ET0I bits of the INTC1 register are reset to zero.
16-Bit Timer/Event Counter 1 Operating Modes -- BS83C24-3
The 16-bit timer has three different operating modes, it can be configured to operate as a general timer,
an external event counter or as a pulse width capture device via the T1M1 and T1M0 bits in the
TMR1C register.
Timer Mode
In this mode, the Timer/Event Counter can be utilised to measure fixed time intervals, providing an
internal interrupt signal each time the Timer/Event Counter overflows. To operate in this mode, the
Operating Mode Select bit pair, T1M1/T1M0, in the Timer Control Register must be set to the correct
value as shown.
Rev. 1.50
70
April 28, 2020
BS83B08-3/B12-3/B16-3/B16G-3/C24-3
8-Bit Touch Key Flash MCU