237CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1 AND 2(3) Square-wave output operationOperates as square wave output with any selected frequency at intervals of the count value preset to 8-bitcompare registers 10 and 20 (CR10, CR20). When setting the count value, set the value of higher 8 bits toCR20 and the value of lower 8 bits to CR10.The TO2/P32 pin output status is reversed at intervals of the count value preset to CR10 and CR20 by settingbit 4 (TOE2) of the 8-bit timer output control register (TOC1) to 1. This enables a square wave with any selectedfrequency to be output.Table 9-10. Square-Wave Output Ranges when 2-Channel 8-Bit Timer/Event Counters(TM1 and TM2) are Used as 16-Bit Timer/Event CounterMinimum Pulse Width Maximum Pulse Width ResolutionMCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 02 × 1/f X 2 2 × 1/f X 2 17 × 1/f X 2 18 × 1/f X 2 × 1/f X 2 2 × 1/f X(400 ns) (800 ns) (26.2 ms) (52.4 ms) (400 ns) (800 ns)2 2 × 1/f X 2 3 × 1/f X 2 18 × 1/f X 2 19 × 1/f X 2 2 × 1/f X 2 3 × 1/f X(800 ns) (1.6μs) (52.4 ms) (104.9 ms) (800 ns) (1.6μs)2 3 × 1/f X 2 4 × 1/f X 2 19 × 1/f X 2 20 × 1/f X 2 3 × 1/f X 2 4 × 1/f X(1.6μs) (3.2μs) (104.9 ms) (209.7 ms) (1.6μs) (3.2μs)2 4 × 1/f X 2 5 × 1/f X 2 20 × 1/f X 2 21 × 1/f X 2 4 × 1/f X 2 5 × 1/f X(3.2μs) (6.4μs) (209.7 ms) (419.4 ms) (3.2μs) (6.4μs)2 5 × 1/f X 2 6 × 1/f X 2 21 × 1/f X 2 22 × 1/f X 2 5 × 1/f X 2 6 × 1/f X(6.4μs) (12.8μs) (419.4 ms) (838.9 ms) (6.4μs) (12.8μs)2 6 × 1/f X 2 7 × 1/f X 2 22 × 1/f X 2 23 × 1/f X 2 6 × 1/f X 2 7 × 1/f X(12.8μs) (25.6μs) (838.9 ms) (1.7 s) (12.8μs) (25.6μs)2 7 × 1/f X 2 8 × 1/f X 2 23 × 1/f X 2 24 × 1/f X 2 7 × 1/f X 2 8 × 1/f X(25.6μs) (51.2μs) (1.7 s) (3.4 s) (25.6μs) (51.2μs)2 8 × 1/f X 2 9 × 1/f X 2 24 × 1/f X 2 25 × 1/f X 2 8 × 1/f X 2 9 × 1/f X(51.2μs) (102.4μs) (3.4 s) (6.7 s) (51.2μs) (102.4μs)2 9 × 1/f X 2 10 × 1/f X 2 25 × 1/f X 2 26 × 1/f X 2 9 × 1/f X 2 10 × 1/f X(102.4μs) (204.8μs) (6.7 s) (13.4 s) (102.4μs) (204.8μs)2 11 × 1/f X 2 12 × 1/f X 2 27 × 1/f X 2 28 × 1/f X 2 11 × 1/f X 2 12 × 1/f X(409.6μs) (819.2μs) (26.8 s) (53.7 s) (409.6μs) (819.2μs)Remarks 1. f X : Main system clock oscillation frequency2. MCS : Oscillation mode selection register (OSMS) bit 03. Values in parentheses when operated at f X = 5.0 MHz.