DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

HT46R03 Просмотр технического описания (PDF) - Holtek Semiconductor

Номер в каталоге
Компоненты Описание
производитель
HT46R03
Holtek
Holtek Semiconductor Holtek
HT46R03 Datasheet PDF : 60 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
HT46R01/HT46R02/HT46R03
means that all I/O pins will default to an input state, the
level of which depends on the other connected circuitry
and whether pull-high options have been selected. If the
PAC port control register, is then programmed to setup
some pins as outputs, these output pins will have an ini-
tial high output value unless the associated PA port data
register is first programmed. Selecting which pins are in-
puts and which are outputs can be achieved byte-wide
by loading the correct value into the port control register
or by programming individual bits in the port control reg-
ister using the ²SET [m].i² and ²CLR [m].i² instructions.
Note that when using these bit control instructions, a
read-modify-write operation takes place. The
microcontroller must first read in the data on the entire
port, modify it to the required new bit values and then re-
write this data back to the output ports.
S y s te m C lo c k
T1
T2
T3
T4
T1
T2
T3
T4
P o rt D a ta
W r ite to P o r t
R e a d fro m P o rt
Read/Write Timing
Pins PA0 to PA6 each have a wake-up functions, se-
lected via the PAWK register. When the device is in the
Power Down Mode, various methods are available to
wake the device up. One of these is a high to low transi-
tion of any of the these pins. Single or multiple pins on
Port A can be setup to have this function.
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 either
one or two count-up timers each of 8-bit capacity de-
pending upon which device is selected. As each timer
has three different operating modes, they can be config-
ured to operate as a general timer, an external event
counter or as a pulse width measurement device. The
provision of an internal prescaler to the clock circuitry of
some of the timer/event counters 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. All devices 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 lists the associated timer register
names.
HT46R01
HT46R02
HT46R03
No. of 8-bit Timers
1
2
Timer Register Name
TMR0
TMR0
TMR1
Timer Control Register
TMR0
TMR0C
TMR1C
An external clock source is used when the timer is in the
event counting mode, the clock source being provided
on the external timer pin, known as TMR0 or TMR1 de-
pending on which device is selected. These external
timer pins are pin-shared with other I/O pins. Depending
upon the condition of the T0E or T1E bit in the corre-
sponding Timer Control Register, each high to low, or
low to high transition on the external timer input pin will
increment the counter by one.
Configuring the Timer/Event Counter Input Clock
Source
The internal timer¢s clock can originate from various
sources, depending upon which device and which timer
is chosen. The system clock input timer source is used
when the timer is in the timer mode or in the pulse width
measurement mode. For Timer/Event Counter 0 this
system clock timer source is first divided by a prescaler,
the division ratio of which is conditioned by the Timer
Control Register bits T0PSC0~T0PSC2.
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 TMR0 or TMR1, depending
upon which device and which timer is used. Depending
upon the condition of the T0E or T1E bit, each high to
low, or low to high transition on the external timer pin will
increment the counter by one.
fS Y S
R T C O s c illa to r
T0S
D a ta B u s
T0P S C 2~T0P S C 0
T0M 1 T0M 0
(1 /2 ~ 1 /2 5 6 )
M
U
X
8 - s ta g e p r e s c a le r
T im e r /E v e n t C o u n te r
M o d e C o n tro l
T0O N
TM R 0
P r e lo a d R e g is te r
R e lo a d
T im e r /E v e n t C o u n te r
¸2
O v e r flo w
to In te rru p t
PFD
T0E
8-bit Timer/Event Counter 0 Structure - All Devices
Rev. 1.00
18
September 21, 2007

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]