HT48C50A-1 Holtek Semiconductor, HT48C50A-1 Datasheet - Page 14

no-image

HT48C50A-1

Manufacturer Part Number
HT48C50A-1
Description
(HT48R50A-1 / HT48C50A-1) I/O Type 8-Bit MCU
Manufacturer
Holtek Semiconductor
Datasheet
www.DataSheet4U.com
Timer/Event Counter
Two timer/event counters (TMR0, TMR1) are imple-
mented in the microcontroller. The Timer/Event Counter
0 contains an 8-bit programmable count-up counter and
the clock may come from an external source or from the
system clock or RTC.
The Timer/Event Counter 1 contains an 16-bit program-
mable count-up counter and the clock may come from
an external source or from the system clock divided by 4
or RTC.
Using the internal clock sources, there are 2 reference
time-bases for Timer/Event Counter 0. The internal
clock source can be selected as coming from f
always be optioned) or f
lator in the Int. RC+RTC mode) by options.
Using the internal clock sources, there are 2 reference
time-bases for Timer/Event Counter 1. The internal
clock source can be selected as coming from f
Rev. 2.00
Bit No.
Bit No.
0~2, 5
0
1
2
3
4
5
6
7
3
4
6
7
T0PSC0
T0PSC1
T0PSC2
Label
T0ON
T0M0
T0M1
Label
T1ON
T1M0
T1M1
T0E
T1E
RTC
To define the prescaler stages, T0PSC2, T0PSC1, T0PSC0=
000: f
001: f
010: f
011: f
100: f
101: f
110: f
111: f
To define the TMR0 active edge of Timer/Event Counter 0
(0=active on low to high; 1=active on high to low)
To enable or disable timer 0 counting (0=disabled; 1=enabled)
Unused bit, read as 0
To define the operating mode
01=Event count mode (external clock)
10=Timer mode (internal clock)
11=Pulse width measurement mode
00=Unused
Unused bit, read as 0
To define the TMR1 active edge of Timer/Event Counter 1
(0=active on low to high; 1=active on high to low)
To enable or disable timer 1 counting (0=disabled; 1=enabled)
To define the operating mode
01=Event count mode (external clock)
10=Timer mode (internal clock)
11=Pulse width measurement mode
00=Unused
(enabled only system oscil-
INT
INT
INT
INT
INT
INT
INT
INT
=f
=f
=f
=f
=f
=f
=f
=f
SYS
SYS
SYS
SYS
SYS
SYS
SYS
SYS
/2 or f
/4 or f
/8 or f
/16 or f
/32 or f
/64 or f
/128 or f
/256 or f
RTC
RTC
RTC
RTC
RTC
RTC
RTC
RTC
TMR0C (0EH) Register
TMR1C (11H) Register
SYS
/2
/4
/8
/16
/32
/64
/128
/256
SYS
(can
/4
14
(can always be optioned) or f
tem oscillator in the Int. RC+RTC mode) by options.
Using external clock input allows the user to count exter-
nal events, measure time internals or pulse widths, or
generate an accurate time base. While using the inter-
nal clock allows the user to generate an accurate time
base.
The Timer/Event Counter 0 can generate PFD signal by
using external or internal clock and PFD frequency is
determine by the equation f
There are 2 registers related to the Timer/Event Counter
0; TMR0 ([0DH]), TMR0C ([0EH]). Two physical registers
are mapped to TMR0 location; writing TMR0 makes the
starting value be placed in the Timer/Event Counter 0
preload register and reading TMR0 gets the contents of
the Timer/Event Counter 0. The TMR0C is a timer/event
countercontrolregister,whichdefines someoptions.
Function
Function
HT48R50A-1/HT48C50-1
INT
RTC
/[2 (256-N)].
(enable only the sys-
March 8, 2006

Related parts for HT48C50A-1