參數(shù)資料
型號: Z80B-CTC
英文描述: Z8 Microcontrollers
中文描述: Z8微控制器
文件頁數(shù): 81/222頁
文件大?。?/td> 1595K
代理商: Z80B-CTC
第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頁第63頁第64頁第65頁第66頁第67頁第68頁第69頁第70頁第71頁第72頁第73頁第74頁第75頁第76頁第77頁第78頁第79頁第80頁當前第81頁第82頁第83頁第84頁第85頁第86頁第87頁第88頁第89頁第90頁第91頁第92頁第93頁第94頁第95頁第96頁第97頁第98頁第99頁第100頁第101頁第102頁第103頁第104頁第105頁第106頁第107頁第108頁第109頁第110頁第111頁第112頁第113頁第114頁第115頁第116頁第117頁第118頁第119頁第120頁第121頁第122頁第123頁第124頁第125頁第126頁第127頁第128頁第129頁第130頁第131頁第132頁第133頁第134頁第135頁第136頁第137頁第138頁第139頁第140頁第141頁第142頁第143頁第144頁第145頁第146頁第147頁第148頁第149頁第150頁第151頁第152頁第153頁第154頁第155頁第156頁第157頁第158頁第159頁第160頁第161頁第162頁第163頁第164頁第165頁第166頁第167頁第168頁第169頁第170頁第171頁第172頁第173頁第174頁第175頁第176頁第177頁第178頁第179頁第180頁第181頁第182頁第183頁第184頁第185頁第186頁第187頁第188頁第189頁第190頁第191頁第192頁第193頁第194頁第195頁第196頁第197頁第198頁第199頁第200頁第201頁第202頁第203頁第204頁第205頁第206頁第207頁第208頁第209頁第210頁第211頁第212頁第213頁第214頁第215頁第216頁第217頁第218頁第219頁第220頁第221頁第222頁
Z8 Microcontrollers
Counter/Timers
ZiLOG
UM001600-Z8X0599
6-3
6.3 COUNTER/TIMER OPERATION
Under software control, counter/timers are started and
stopped via the Timer Mode Register (TMR,F1H) bits D
0
-
D
3
(Figure 6-6). Each counter/timer is associated with a
Load bit and an Enable Count bit.
6.3.1 Load and Enable Count Bits
Setting the Load bit (D
0
for T0 and D
2
for T1) transfers the
initial value in the prescaler and the counter/timer registers
into their respective down-counters. The next internal
clock resets bits D
0
and D
2
to 0, readying the Load bit for
the next load operation. New values may be loaded into
the down-counters at any time. If the counter/timer is run-
ning, it continues to do so and starts the count over with
the new value. Therefore, the Load bit actually functions as
a software re-trigger.
The counter timers remain at rest as long as the Enable
Count bits are 0. To enable counting, the Enable Count bit
(D
1
for T0 and D
3
for T1) must be set to 1. Counting actu-
ally starts when the Enable Count bit is written by an in-
struction. The first decrement occurs four internal clock pe-
riods after the Enable Count bit has been set. If T1 is
configured to use an external clock, the first decrement be-
gins on the next clock period. The Load and Enable Count
bits can be set at the same time. For example, using the
instruction:
OR TMR,#03H
sets both D0 and D1 of the TMR. This loads the initial val-
ues of PRE0 and T0 into their respective counters and
starts the count after the M2T2 machine state after the op-
erand is fetched (Figure 6-7).
Figure 6-6. Timer Mode Register
D3 D2 D1 D0
(% F1; Read/Write)
0 = Disable T
0
Count
1 = Enable T
0
Count
0 = No Function
1 = Load T
1
0 = No Function
1 = Load T
0
Timer Mode Register
R241 TMR
0 = Disable T
1
Count
1 = Enable T
1
Count
Figure 6-7. Starting The Count
D0
(% F5; Write-Only)
Count Mode
0 = T
1
Single Pass
1 = T
1
Modulo-n
Prescaler 0 Register
R245 PRE0
(% F3; Write-Only)
Prescaler 1 Register
R243 PRE1
Figure 6-8. Counting Modes
T1 T2 T3 T1 T2 T3 T1 T2 T3 T1 T2 T3
TMR is Written, Counter/Timer
is Loaded
First Decrement Occurs
Four Clock Periods Later
#03H is Fetched
M3 M1 M2 Mn
相關PDF資料
PDF描述
Z80B-DART Z8 Microcontrollers
Z80B-PIO Z8 Microcontrollers
Z86E2116PSC Z8 Microcontrollers
Z8300-1PS 8-Bit Microprocessor
Z8300-3PS Microprocessor
相關代理商/技術參數(shù)
參數(shù)描述
Z80B-DART 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Z8 Microcontrollers
Z80B-PIO 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Z8 Microcontrollers
Z80B-SIO/O 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Z8 Microcontrollers
Z80C30 制造商:ZILOG 制造商全稱:ZILOG 功能描述:CMOS SCC SERIAL COMMUNICATIONS CONTROLLER
Z80C30-06LME 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Communications Controller