參數(shù)資料
型號(hào): HT46C23
廠商: Holtek Semiconductor Inc.
英文描述: A/D Type 8-Bit MCU
中文描述: 的A / D型8位微控制器
文件頁數(shù): 14/48頁
文件大?。?/td> 348K
代理商: HT46C23
HT46R23/HT46C23
Rev. 1.60
14
May 3, 2004
. ( "
$ ) +
"
( "
" !
) "
!
.
1
3 4 (
" # " ( %
. "
3 4
,
7
,
2 4
$
" .
)
"
$ ( "
(
" .
)
5 " , . A
! "
#
*
A
' "
, , "
> $ +
' "
*
A
' "
2 4
$
$
"
5 " !
! "
$ % $
9 2 <
:
9 / <
:
#
"
Timer/Event Counter
Timer/Event Counter
A timer/event counter (TMR) is implemented in the
microcontroller. The timer/event counter contains an
16-bit programmable count-up counter and the clock
may come from an external source or the system clock.
Using the internal system clock, there is only one refer-
ence time-base. The internal clock source comes from
f
SYS
. The external clock input allows the user to count
external events, measure time intervals or pulse widths,
or to generate an accurate time base.
There are three registers related to the timer/event
counter; TMRH (0CH), TMRL (0DH), TMRC (0EH).
Writing TMRL will only put the written data to an internal
lower-order byte buffer (8 bits) and writing TMRH will
transfer the specified data and the contents of the
lower-order byte buffer to TMRH and TMRLpreload reg-
isters, respectively. The timer/event counter preload
register is changed by each writing TMRH operations.
Reading TMRH will latch the contents of TMRH and
TMRL counters to the destination and the lower-order
bytebuffer,respectively.ReadingtheTMRLwillreadthe
contents of the lower-order byte buffer. The TMRC is the
timer/event counter control register, which defines the
operating mode, counting enable or disable and active
edge.
The TM0, TM1 bits define the operating mode. The
event count mode is used to count external events,
which means the clock source comes from an external
(TMR) pin. The timer mode functions as a normal timer
with the clock source coming from the f
INT
clock. The
pulse width measurement mode can be used to count the
high or low level duration of the external signal (TMR).
The counting is based on the f
INT
.
In the event count or timer mode, once the timer/event
counter starts counting, it will count from the current con-
tents in the timer/event counter to FFFFH. Once overflow
occurs, the counter is reloaded from the timer/event coun-
ter preload register and generates the interrupt request
flag (TF; bit 5 of INTC0) at the same time.
InthepulsewidthmeasurementmodewiththeTONand
TE bits equal to one, once the TMR has received a tran-
sient from low to high (or high to low if the TE bits is 0 )
it will start counting until the TMR returns to the original
level and resets the TON. The measured result will re-
main in the timer/event counter even if the activated
transient occurs again. In other words, only one cycle
measurement can be done. Until setting the TON, the
cycle measurement will function again as long as it re-
ceives further transient pulse. Note that, in this operat-
ing mode, the timer/event counter starts counting not
according to the logic level but according to the transient
edges. In the case of counter overflows, the counter is
reloaded from the timer/event counter preload register
and issues the interrupt request just like the other two
modes. To enable the counting operation, the timer ON
bit (TON; bit 4 of TMRC) should be set to 1. In the pulse
width measurement mode, the TON will be cleared au-
tomatically after the measurement cycle is completed.
But in the other two modes the TON can only be reset by
instructions. The overflow of the timer/event counter is
one of the wake-up sources. No matter what the opera-
tion mode is, writing a 0 to ETI can disable the interrupt
service.
In the case of timer/event counter OFF condition, writing
data to the timer/event counter preload register will also
reload that data to the timer/event counter. But if the
timer/event counter is turned on, data written to it will
only be kept in the timer/event counter preload register.
The timer/event counter will still operate until overflow
occurs. When the timer/event counter (reading TMRH)
is read, the clock will be blocked to avoid errors. As
clock blocking may results in a counting error, this must
be taken into consideration by the programmer.
The bit0~bit2 of the TMRC can be used to define the
pre-scaling stages of the internal clock sources of the
timer/event counter. The definitions are as shown. The
overflow signal of the timer/event counter can be used
to generate the PFD signal.
相關(guān)PDF資料
PDF描述
HT46C24 A/D Type 8-Bit MCU
HT46R24 A/D Type 8-Bit MCU
HT46C46 Cost-Effective A/D Type 8-Bit MCU
HT46C47 Cost-Effective A/D Type 8-Bit MCU
HT46R46 Cost-Effective A/D Type 8-Bit MCU
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
HT46C232 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:A/D Type 8-Bit MCU
HT46C24 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:A/D Type 8-Bit MCU
HT46C46 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:Cost-Effective A/D Type 8-Bit MCU
HT46C46E 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:Cost-Effective A/D Type 8-Bit MCU
HT46C47 制造商:HOLTEK 制造商全稱:Holtek Semiconductor Inc 功能描述:Cost-Effective A/D Type 8-Bit MCU