Fujitsu MB90480 Series Hardware Manual page 303

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

Compare function
The compare function is available in any modes other than the timer mode. If RCR and UDCR
values match at the start of the compare function, CMPF is specified and an interrupt request
occurs. When the compare clear function starts, UDCR is cleared at the next timing of the
incremented clock.
In a mode where there is no up counting, the start of this function is disabled.
(0FFFF
)
H
0FF
H
RCR
00
H
Up/down count at any width in reload/compare function
When a reload/compare function starts, an up/down count is available at any width.
When an underflow occurs by the reload function, the RCR value is transferred to UDCR. The
compare function clears UDCR if RCR and UDCR have matching values. Using both functions,
an up/down count is performed in a range of 00
Figure 13.5-5 Outline of operation where reload and compare functions start at one time
(0FFFF
)
H
Compare result
0FF
H
matched
RCR
00
H
Counter
If compare result finds a match or a reload (underflow) occurs, an interrupt can be generated to
CPU. These interrupt outputs are controlled so that they are enabled independently.
The timing of reload and clear operations for UDCR varies between the count start and stop
modes.
Figure 13.5-4 Outline of compare function operation
Compare result matched
Counter cleared,
interrupt generated
Compare result
matched
Counter
Underflow
clear
clear
CHAPTER 13 8/16-BIT UP/DOWN COUNTER/TIMER
Compare result matched
Counter cleared,
interrupt generated
to RCR.
H
Reload
Reload
Underflow
Compare result
Reload
matched
Underflow
Counter
clear
281

Advertisement

Table of Contents
loading

Table of Contents