Fujitsu MB90460 Series Hardware Manual page 371

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 14 MULTI-FUNCTIONAL TIMER
WARI:
;
;
;
CODE
;-------Vector setting------------------------------------------------------------------------------------------------
VECT
VECT
■ Sample Program for 16-bit Output Compare
Processing
A output compare match interrupt is generated when the count value of 16-bit free-run timer is matched
with output compare 0.
• The 16-bit free-run timer is used in up-count mode.
2
• EI
OS is not used.
• 16 MHz is used for the machine clock, and 62.5 ns is used for the count clock of 16-bit free-run timer.
Coding example
ICR00
TCCS
CPCLRB
OCCP0
OCCP1
OCS01
IOP
;-------Main program------------------------------------------------------------------------------------------------
CODE
START:
;
352
CLRB
I:ICLR
:
User processing
:
RETI
ENDS
CSEG
ABS=0FFH
ORG
0FF74H
DSL
WARI
ORG
0FFDCH
DSL
START
DB
00H
ENDS
END
START
EQU
0000B0H
EQU
00005EH
EQU
000058H
EQU
000070H
EQU
000072H
EQU
00007CH
EQU
OCS01:6
CSEG
:
;Clears interrupt request flag
;Returns from interrupt
;Sets vector for interrupt #34 (22H)
;Sets reset vector
;Sets single-chip mode
;Interrupt control register for the output compare 0
;Timer control status register
;Compare clear buffer register
;Output compare register 0
;Output compare register 1
;Compare control register
;Interrupt request flag bit
;Assumes that stack pointer (SP) has already been
initialized

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents