Rev. 5.00, 12/03, page 335 of 1088
9.4
Operation
9.4.1
Overview
Operation in each mode is outlined below.
Normal Operation: Each channel has a TCNT and TGR register. TCNT performs up-counting,
and is also capable of free-running operation, synchronous counting, and external event counting.
Each TGR can be used as an input capture register or output compare register.
Synchronous Operation: When synchronous operation is designated for a channel, TCNT for
that channel performs synchronous presetting. That is, when TCNT for a channel designated for
synchronous operation is rewritten, the TCNT counters for the other channels are also rewritten at
the same time. Synchronous clearing of the TCNT counters is also possible by setting the timer
synchronization bits in TSYR for channels designated for synchronous operation.
Buffer Operation
•
When TGR is an output compare register
When a compare match occurs, the value in the buffer register for the relevant channel is
transferred to TGR.
•
When TGR is an input capture register
When input capture occurs, the value in TCNT is transferred to TGR and the value previously
held in TGR is transferred to the buffer register.
Cascaded Operation: The channel 1 counter (TCNT1) and channel 2 counter (TCNT2), or the
channel 4 counter (TCNT4) and channel 5 counter (TCNT5), can be connected together to operate
as a 32-bit counter.
PWM Mode: In this mode, a PWM waveform is output. The output level can be set by means of
TIOR. A PWM waveform with a duty of between 0% and 100% can be output, according to the
setting of each TGR register.
Phase Counting Mode: In this mode, TCNT is incremented or decremented by detecting the
phases of two clocks input from the external clock input pins in channels 1, 2, 4, and 5. When
phase counting mode is set, the corresponding TCLK pin functions as the clock pin, and TCNT
performs up/down-counting.
This can be used for two-phase encoder pulse input.
Содержание H8S/2318 series
Страница 2: ......
Страница 6: ...Rev 5 00 12 03 page vi of xxx...
Страница 12: ...Rev 5 00 12 03 page xii of xxx...
Страница 30: ...Rev 5 00 12 03 page xxx of xxx...
Страница 54: ...Rev 5 00 12 03 page 24 of 1088...
Страница 98: ...Rev 5 00 12 03 page 68 of 1088...
Страница 128: ...Rev 5 00 12 03 page 98 of 1088...
Страница 138: ...Rev 5 00 12 03 page 108 of 1088...
Страница 168: ...Rev 5 00 12 03 page 138 of 1088...
Страница 212: ...Rev 5 00 12 03 page 182 of 1088...
Страница 324: ...Rev 5 00 12 03 page 294 of 1088...
Страница 436: ...Rev 5 00 12 03 page 406 of 1088...
Страница 546: ...Rev 5 00 12 03 page 516 of 1088...
Страница 580: ...Rev 5 00 12 03 page 550 of 1088...
Страница 822: ...Rev 5 00 12 03 page 792 of 1088...
Страница 876: ...Rev 5 00 12 03 page 846 of 1088...
Страница 901: ...Rev 5 00 12 03 page 871 of 1088 A 2 Instruction Codes Table A 2 shows the instruction codes...
Страница 1121: ...H8S 2319 Group H8S 2318 Group Hardware Manual REJ09B0089 0500O...