Fujitsu FR81S User Manual

Page of 2342
CHAPTER 27: UP/DOWN COUNTER 
 
 
6. Operation and Setting Procedure Examples 
 
FUJITSU SEMICONDUCTOR LIMITED 
CHAPTER : UP/DOWN COUNTER 
FUJITSU SEMICONDUCTOR CONFIDENTIAL 
28 
 Operation performed when the reload function is in use 
The operation is similar to that in timer mode. See "
■ Counting" in "6.1. Operation in Timer Mode". 
 Operation performed when the compare function is in use 
When the up/down counter value matches the value set in the reload compare register (RCR), the CMPF bit 
of the counter status register (CSR) changes to "1". At this time, a compare result match interrupt request 
occurs if the CITE bit of the counter status register (CSR) is set to "1". 
If an attempt is made to further increment the counter in this condition, the up/down counter value is cleared 
to "0000
H
" and counting-up restarts. 
Figure 6-4 shows the operation performed when the compare function is in use. 
Figure 6-4 Operation Performed When the Compare Function is in Use 
 
 
 
 
Note: 
If the compare function is in use, the up/down counter value will be cleared to "0000
H
" when one of the 
following conditions is fulfilled. 
·  The up/down counter value matches the value set in the reload compare register (RCR) (compare result 
match) and further, the next counting up operation is performed. 
·  However, a comparison result match does not cause clearing of the up/down counter value if one of the 
following conditions is fulfilled: 
·  The next operation is counting down.   
·  The up/down counter is inactive. 
 
RCR 
RCR : Reload compare register 
Compare result 
match
 
00
H
 
FF
H
 
(0FFFF
H
)
 
Counter clear 
(Compare result match interrupt 
request generation) 
Compare result 
match
 
 
Counter clear 
(Compare result match interrupt 
request generation) 
 
MB91520 Series
MN705-00010-1v0-E
1035