Fujitsu MB90420/5 (A) Series Hardware Manual page 242

F2mc-16lx family 16-bit microcontrollers
Table of Contents

Advertisement

MB90420/5 (A) SERIES F
n Program example of time-base timer
• Processing specification
12
The 2
/HCLK (HCLK: oscillation clock) interval interrupt is generated repeatedly.
In this case, the interval time is about 1.0 ms (operation at 4 MHz).
• Coding example
ICR12
EQU
TBTC
EQU
TBOF
EQU
Main program
;----------
CODE
CSEG
START:
;
AND
MOV
MOV
MOV
OR
LOOP:
MOV
MOV
BRA
Interrupt program
;----------
WARI:
CLRB
;
Processing by user
;
;
RETI
CODE
ENDS
Vector setting
;----------
VECT
CSEG
ORG
DSL
ORG
DSL
DB
VECT
ENDS
END
2
MC-16LX FAMILY 16-BIT MICROCONTROLLERS HARDWARE MANUAL
0000BC
;
H
0000A9
;
H
TBTC:3
;
------------------------------------------------------
;
CCR, #0BF
;
H
I:ICR12, #00
;
H
I:TBTC, #10010000
B
;
;
;
ILM, #07
;
H
CCR, #40
;
H
A,#00
;
H
A,#01
H
LOOP
--------------------------------------------------
I:TBOF
;
;
---------------------------------------------------------
ABS=0FF
H
0FF70
;
H
WARI
0FFDC
;
H
START
00
;
H
START
Time-base timer interrupt control register
Time-base timer control register
Interrupt request flag bit
Stack pointer (SP), already initialized
Interrupts disabled
Interrupt level 0 (highest)
; Upper 3 bits fixed
Interrupts enabled, TBOF cleared
Counter cleared
Interval time of 212/HCLK selected
ILM in PS set to level 7
Interrupts enabled
Infinite loop
Interrupt request flag cleared
Return from interrupt
Set vector to interrupt #35 (23
Reset vector setting
Set to single-chip mode
9-20
)
H

Advertisement

Table of Contents
loading

Table of Contents