Timer/Event Counters
The provision of timers form an important part of any microcontroller, giving the designer a means of
carrying out time related functions. The devices contain one 8-bit and one 16-bit timers. The 8-bit
timer is a general timer. As 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. The provision
of an internal prescaler to the clock circuitry on gives added range to the timers.
There are two types of registers related to the Timer/Event Counters. The first is the register that
contains the actual value of the timer and into which an initial value can be preloaded. Reading from
this register retrieves the contents of the Timer/Event Counter. The second type of associated register
is the Timer Control Register which defines the timer options and determines how the timer is to be
used. The device can have the timer clock configured to come from the internal clock source. In
addition, the timer clock source can also be configured to come from an external timer pin.
The accompanying table illustrates the Timer Type list for the devices.
Device
Timer Type
Timer Register
Name
Timer Control
Register Name
Time Operating
Modes
BS83B08-3
BS83B12-3
BS83B16-3
BS83B16G-3
8-bit
TMR
TMRC
Timer Mode
BS83C24-3
8-bit
TMR0
TMRC0
Timer Mode
16-bit
TMR1L/TMR1H
TMRC1
Timer Mode
Event Counter Mode
Pulse Width Capture Mode
Timer Type Summary Table
BS83B08-3/B12-3/B16-3/B16G-3/C24-3
8-Bit Touch Key Flash MCU
Rev. 1.50
67
April 28, 2020
M U X
f
T P
f
L I R C
f
S Y S
T i m e r P r e s c a l e r
0
1
T P S C [ 2 : 0 ]
7 S t a g e C o u n t e r
T i m e - B a s e C o n t r o l
T i m e - B a s e e v e n t i n t e r r u p t P e r i o d
8 - 1 M U X
7
T S
P r e l o a d R e g i s t e r
U p C o u n t e r
D a t a B u s
O v e r f l o w t o I n t e r r u p t
R e l o a d
8-bit Timer/Event Counter
M U X
f
T P
f
L I R C
f
S Y S
T i m e r P r e s c a l e r
0
1
T 0 P S C [ 2 : 0 ]
7 S t a g e C o u n t e r
T i m e - B a s e C o n t r o l
T i m e - B a s e e v e n t i n t e r r u p t P e r i o d
8 - 1 M U X
7
T 0 S
P r e l o a d R e g i s t e r
U p C o u n t e r
D a t a B u s
O v e r f l o w t o I n t e r r u p t
R e l o a d
8-bit Timer/Event Counter 0