Electronic Components Datasheet Search
  English  ▼

X  

HT48R005 Datasheet(PDF) 31 Page - Holtek Semiconductor Inc

Part # HT48R005
Description  Small Package 8-Bit OTP MCU
PDF  62 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  HOLTEK [Holtek Semiconductor Inc]
Direct Link  http://www.holtek.com
Logo HOLTEK - Holtek Semiconductor Inc

HT48R005 Datasheet(HTML) 31 Page - Holtek Semiconductor Inc

Back Button HT48R005 Datasheet HTML 27Page - Holtek Semiconductor Inc HT48R005 Datasheet HTML 28Page - Holtek Semiconductor Inc HT48R005 Datasheet HTML 29Page - Holtek Semiconductor Inc HT48R005 Datasheet HTML 30Page - Holtek Semiconductor Inc HT48R005 Datasheet HTML 31Page - Holtek Semiconductor Inc HT48R005 Datasheet HTML 32Page - Holtek Semiconductor Inc HT48R005 Datasheet HTML 33Page - Holtek Semiconductor Inc HT48R005 Datasheet HTML 34Page - Holtek Semiconductor Inc HT48R005 Datasheet HTML 35Page - Holtek Semiconductor Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 31 / 62 page
background image
HT48R005/HT46R005
Rev. 1.00
31
November 29, 2011
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 from one
count-up timer of 8-bit capacity. As the timer has three
different operating modes, it can be configured to oper-
ate 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 timer.
There are two types of registers related to the
Timer/Event Counters. The first is the register that con-
tains the actual value of the timer and into which an ini-
tial 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 deter-
mines 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.
Configuring the Timer/Event Counter Input Clock
Source
The Timer/Event Counter clock source can originate
from various sources, an internal clock or an external
pin. The internal clock source source is used when the
timer is in the timer mode or in the pulse width capture
mode. For some Timer/Event Counters, this internal
clock source is first divided by a prescaler, the division
ratio of which is conditioned by the Timer Control Regis-
ter bits T0PSC0~T0PSC2. For Timer/Event Counter,
the internal clock source is fro the fSYS.
An external clock source is used when the timer is in the
event counting mode, the clock source being provided
on an external timer pin TMR. Depending upon the con-
dition of the T0EG bit, each high to low, or low to high
transition on the external timer pin will increment the
counter by one.
Timer Registers
- TMR
The timer register is special function register located in
the Special Purpose Data Memory and is the place
where the actual timer value is stored. This register is
known as TMR0. The value in the timer registers in-
creases by one each time an internal clock pulse is re-
ceived or an external transition occurs on the external
timer pin. The timer will count from the initial value
loaded by the preload register to the full count of FFH at
which point the timer overflows and an internal interrupt
signal is generated. The timer value will then be reset
with the initial preload register value and continue count-
ing.
Note that to achieve a maximum full range count of FFH,
the preload register must first be cleared to all zeros. It
should be noted that after power-on, the preload regis-
ters will be in an unknown condition. Note that if the
Timer/Event Counter is in an OFF condition and data is
written to its preload register, this data will be immedi-
ately written into the actual counter. However, if the
counter is enabled and counting, any new data written
into the preload data register during this period will re-
main in the preload register and will only be written into
the actual counter the next time an overflow occurs.
Timer Control Registers
- TMR0C
The flexible features of the Holtek microcontroller
Timer/Event Counters enable them to operate in three
different modes, the options of which are determined by
the contents of their respective control register.
The Timer Control Register is known as TMR0C. It is the
Timer Control Register together with its corresponding
timer register that control the full operation of the
Timer/Event Counter. Before the timer can be used, it is
essential that the Timer Control Register is fully pro-
grammed with the right data to ensure its correct opera-
tion, a process that is normally carried out during
program initialisation.
To choose which of the three modes the timer is to oper-
ate in, either in the timer mode, the event counting mode
or the pulse width capture mode, bits 7 and 6 of the
Timer Control Register, which are known as the bit pair
T0M1/T0M0, must be set to the required logic levels.
The timer-on bit, which is bit 4 of the Timer Control Reg-
ister and known as T0ON, provides the basic on/off con-
T M R
T i m e r / E v e n t C o u n t e r
M o d e C o n t r o l
T 0 O N
P r e l o a d R e g i s t e r
T i m e r / E v e n t
C o u n t e r
D a t a B u s
R e l o a d
O v e r f l o w
t o I n t e r r u p t
2
P r e s c a l e r
T 0 P S C 2 ~ T 0 P S C 0
T 0 M 1 T 0 M 0
f S Y S
B u z z e r
¸
T 0 E
8-bit Timer/Event Counter Structure



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com