Program Example Of Delayed Interrupt Generation Module - Fujitsu F2MCTM-16LX Hardware Manual

16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 4 DELAYED INTERRUPT GENERATION MODULE
4.6

Program Example of Delayed Interrupt Generation Module

This section gives a program example of the delayed interrupt generation module.
Program Example of Delayed Interrupt Generation Module
Processing specification
The main program writes "1" to the R0 bit in the delayed interrupt request generate/cancel register (DIRR)
to generate a delayed interrupt request and performs task switching.
Coding example
ICR15
DIRR
DIRR_R0 EQU
;---------Main program------------------------------------
CODE
START:
;---------Interrupt program--------------------------------------
WARI:
;
;
CODE
;---------Vector setting-----------------------------------------
VECT
VECT
90
EQU
0000BFH
EQU
00009FH
DIRR:0
CSEG
AND
CCR,#0BFH
MOV
I:ICR15,#00H
MOV
ILM,#07H
OR
CCR,#40H
SETB
I:DIRR_R0
LOOP
MOV A,#00H
MOV
A,#01H
BRA
LOOP
CLRB
I:DIRR_R0
:
User processing
:
RETI
ENDS
CSEG
ABS=0FFH
ORG
0FF54H
DSL
WARI
ORG
0FFDCH
DSL
START
DB
00H
ENDS
END
START
;Interrupt control register
;Delayed interrupt factor generate/
cancel register
;Delay interrupt request generating bit
;Stack pointer (SP),already initialized
;Interrupt disabled
;Interrupt level 0 (strong)
;Setting ILM in PS to level 7
;Interrupt enabled
;Delay interrupt request generating
;No limit loop
;Clear interrupt request flag
;Recovery from interrput
;Setting vector to interrupt #42 (2AH)
;Reset vector setting
;Setting to single-chip mode

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90360 series

Table of Contents