Fujitsu MB90460 Series Hardware Manual page 273

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 12 16-BIT RELOAD TIMER
LOOP:
;-------Interrupt program--------------------------------------------------------------------------------------------
WARI:
;
;
;
CODE
;-------Vector setting------------------------------------------------------------------------------------------------
VECT
VECT
■ Sample Program in Event Count Mode
Processing
• When the rising edge of the pulse input to the external event input pin is counted 10,000 times with 16-
bit reload timer/counter 0, an interrupt is generated.
• The timer operates in single-shot mode.
• External trigger input selects the rising edge.
2
• EI
OS is not used.
Coding example
ICR09
TMCSR
TMR
TMRD
DDR1
UF
CNTE
TRG
254
MOV
A,#00H
MOV
A,#01H
BRA
LOOP
CLRB
I:UF
:
User processing
:
RETI
ENDS
CSEG
ABS=0FFH
ORG
0FF84H
DSL
WARI
ORG
0FFDCH
DSL
START
DB
00H
ENDS
END
START
EQU
0000B9H
EQU
000082H
EQU
000084H
EQU
000084H
EQU
000011H
EQU
TMCSR:2
EQU
TMCSR:1
EQU
TMCSR:0
;Endless loop
;
;
;Clears interrupt request flag
;Returns from interrupt
;Sets vector for interrupt #30 (1EH)
;Sets reset vector
;Sets single-chip mode
;Interrupt control register for the 16-bit reload timer
;Timer control status register
;16-bit timer register
;16-bit reload register
;Port data register
;Interrupt request flag bit
;Counter operation enable bit
;Software trigger bit

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents