參數(shù)資料
型號: MC80F0224
廠商: Electronic Theatre Controls, Inc.
元件分類: 8位微控制器
英文描述: 8-BIT SINGLE-CHIP MICROCONTROLLERS
中文描述: 8位單晶片微控制器
文件頁數(shù): 59/128頁
文件大小: 1408K
代理商: MC80F0224
Preliminary
MC80F0208/16/24
MAR. 2005 Ver 0.2
55
Figure 14-7 Timer Count Example
14.1.2 8-bit Event Counter Mode
In this mode, counting up is started by an external trigger. This
trigger means rising edge of the EC0 or EC1 pin input. Source
clock is used as an internal clock selected with timer mode regis-
ter TM0 or TM2. The contents of timer data register TDR
n
(n =
0,1,2,3) are compared with the contents of the up-counter T
n
. If a
match is found, an timer interrupt request flag T
n
IF is generated,
and the counter is cleared to “0”. The counter is restart and count
up continuously by every falling edge of the EC0 or EC1 pin in-
put. The maximum frequency applied to the EC0 or EC1 pin is
f
XIN
/2 [Hz].
In order to use event counter function, the bit 4, 5 of the Port Se-
lection Register PSR0(address 0F8
H
) is required to be set to “1”.
After reset, the value of timer data register TDR
n
is initialized to
"0", The interval period of Timer is calculated as below equation.
Figure 14-8 Event Counter Mode Timing Chart
~
Timer 0 (T0IF)
Interrupt
TDR0
TIME
Occur interrupt
Occur interrupt
Occur interrupt
Interrupt period
= 8
μ
s x (124+1)
upcoun
~
~
0
1
2
3
4
5
6
7A
7C
Count Pulse
Period
7B
MATCH
(TDR0 = T0)
Example:
Make 1ms interrupt using by Timer0 at 4MHz
LDM
LDM
SET1
EI
TM0,#0FH
TDR0,#124
T0E
; divide by 32
; 8us x (124+1)= 1ms
; Enable Timer 0 Interrupt
; Enable Master Interrupt
When
TDR0 = 124
D
= 7C
H
f
XIN
= 4 MHz
INTERRUPT PERIOD =
4
×
10
6
Hz
1
×
32
×
(124+1) = 1 ms
TM0 = 0000 1111
B
(8-bit Timer mode, Prescaler divide ratio = 32)
8
μ
s
7C
0
Period (sec)
f
XIN
----1
2
Divide Ratio
(TDRn+1)
×
×
×
=
0
1
2
1
0
n
2
~
~
~
n-1
n
~
~
~
ECn pin input
Up-counter
TDR1
T1IF interrupt
Start count
相關(guān)PDF資料
PDF描述
MC80F0224K 8-BIT SINGLE-CHIP MICROCONTROLLERS
MC80F0224Q 8-BIT SINGLE-CHIP MICROCONTROLLERS
MC88A 8 TUNES 8 KEY WITH SCAN KEY
MC971 For High Speed Swiching Application Silicon Epitaxial Type(Common Cathode)
MCA-15 15W Ultraminiature Modular Switching Power Supplies
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MC80F0224K 制造商:未知廠家 制造商全稱:未知廠家 功能描述:8-BIT SINGLE-CHIP MICROCONTROLLERS
MC80F0224Q 制造商:未知廠家 制造商全稱:未知廠家 功能描述:8-BIT SINGLE-CHIP MICROCONTROLLERS
MC80F0424 制造商:未知廠家 制造商全稱:未知廠家 功能描述:8-BIT SINGLE-CHIP MICROCONTROLLERS
MC80F0424K 制造商:未知廠家 制造商全稱:未知廠家 功能描述:8-BIT SINGLE-CHIP MICROCONTROLLERS
MC80F0424L 制造商:未知廠家 制造商全稱:未知廠家 功能描述:8-BIT SINGLE-CHIP MICROCONTROLLERS