Program Example Of Interrupt Processing - Fujitsu MB90335 Series Hardware Manual

16-bit microcontroller
Table of Contents

Advertisement

MB90335 Series
3.11

Program Example of Interrupt Processing

An example of interrupt processing program is shown below.
■ Program Example of Interrupt Processing
Processing specification
An example interruption program that uses external interruption 0 (INT0)
Coding example
DDR6
ENIR
EIRR
ELVR
ICR03
STACK
RW
STACK_T
STACK
;----------Main Program------------------------------------------------------------
CODE
START:
LOOP:
CM44-10137-6E
EQU
000016H
EQU
00003CH
EQU
00003DH
EQU
00003EH
EQU
0000B3H
SSEG
100
RW
1
ENDS
CSEG
MOV
RP, #0
MOV
ILM, #07H
MOV
A, #!STACK_T
MOV
SSB, A
MOVW A, #STACK_T
MOVW SP, A
MOV
DDR6,#00000000B
OR
CCR, #40H
MOV
I:ICR03, #00H
MOV
I:ELVR, #00000001B
MOV
I:EIRR, #00H
MOV
I:ENIR, #01H
:
NOP
NOP
NOP
FUJITSU MICROELECTRONICS LIMITED
CHAPTER 3 INTERRUPT
3.11 Program Example of Interrupt Processing
; Port 6 direction register
; Interruption/DTP permission register
; Interruption/DTP factor register (EIRR)
; A register to specify the required level
; Interrupt control register 03
; Stack
;
; Header bank used for general-purpose registers
; Sets ILM in PS to level 7
; Sets system stack
; Setting of stack pointer, in this case,
; S flag = 1, so set to SSP
; Sets the P60/INT0 pin for input
; Sets I flag of CCR in PS to enable interrupts.
; It is assumed interrupt levels 0(Max)
; Make INT0 "H" level request
; Clears interrupt cause for INT0.
; INT0 input permitted
; Dummy loop
105

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16lxMb90v330aMb90f337Mb90337

Table of Contents