Download Print this page

Epson S1C31D50 Technical Instructions page 274

Cmos 32-bit single chip microcontroller
Hide thumbs Also See for S1C31D50:

Advertisement

Operations in comparator mode
The comparator mode compares the counter value and the value set via software. It generates an
interrupt and toggles the timer output signal level when the values are matched. The T16B_nCCRm
register functions as the compare data register used for setting a comparison value in this mode. The
TOUTnm/CAPnm pin is configured to the TOUTnm pin.
When the counter reaches the value set in the T16B_nCCRm register during counting, the comparator
asserts the MATCH signal and sets the T16B_nINTF.COMPCAPmIF bit (compare interrupt flag) to 1.
When the counter reaches the MAX value in comparator mode, the T16B_nINTF.CNTMAXIF bit
(counter MAX interrupt flag) is set to 1. When the counter reaches 0x0000, the
T16B_nINTF.CNTZEROIF bit (counter zero interrupt flag) is set to 1.
Repeat up count mode
(1)
0xffff
Counter
0x0000
Repeat down count mode
(2)
0xffff
Counter
0x0000
Repeat up/down count mode
(3)
0xffff
during counting up
Counter
0x0000
Figure 17.4.3.1 Operation Examples in Comparator Mode
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
PRESET = 1
RUN = 1
Count cycle
Compare period
CNTMAXIF = 1
CMPCAPmIF = 1
PRESET = 1
RUN = 1
Count cycle
Compare period
CNTZEROIF = 1
CMPCAPmIF = 1
PRESET = 1
RUN = 1
Count cycle
Compare period
Compare period
during counting down
CNTMAXIF = 1
CMPCAPmIF = 1
CMPCAPmIF = 1
Seiko Epson Corporation
RUN = 0
RUN = 1
CNTMAXIF = 1
CMPCAPmIF = 1
CMPCAPmIF = 1
RUN = 0
RUN = 1
CNTZEROIF = 1
CMPCAPmIF = 1
CMPCAPmIF = 1
CNTZEROIF = 1
CNTMAXIF = 1
CMPCAPmIF = 1
Software operation
Hardware operation
MAX value
(T16B_nMC register)
Comparison value
(T16B_nCCRm register)
Time
CNTMAXIF = 1
MAX value
(T16B_nMC register)
Comparison value
(T16B_nCCRm register)
Time
CNTZEROIF = 1
MAX value
(T16B_nMC register)
Comparison value
(T16B_nCCRm register)
Time
17-9

Advertisement

loading