11.07.2015 Views

uPD789074 Subseries 8-Bit Single-Chip Microcontrollers UD - Home

uPD789074 Subseries 8-Bit Single-Chip Microcontrollers UD - Home

uPD789074 Subseries 8-Bit Single-Chip Microcontrollers UD - Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 6 16-BIT TIMER 906.4 Operation of 16-<strong>Bit</strong> Timer 906.4.1 Operation as timer interrupt16-bit timer 90 can generate interrupts repeatedly each time the free-running counter value reaches the value setto CR90. Since this counter is not cleared and holds the count even after an interrupt is generated, the interval timeis equal to one cycle of the count clock set in TCL901 and TCL900.To operate 16-bit timer 90 as a timer interrupt, the following settings are required.• Set the count value in CR90• Set 16-bit timer mode control register 90 (TMC90) as shown in Figure 6-5.Figure 6-5. Settings of 16-<strong>Bit</strong> Timer Mode Control Register 90 for Timer Interrupt OperationTOD90 TOF90 CPT901 CPT900 TOC90 TCL901 TCL900 TOE90TMC90− 0/1 0/1 0/1 0/1 0/1 0/1 0/1Setting of count clock (see Table 6-2)Caution If both the CPT901 and CPT900 flags are set to 0, the capture operation is disabled.When the count value of 16-bit timer counter 90 (TM90) matches the value set in CR90, counting of TM90continues and an interrupt request signal (INTTM90) is generated.Table 6-2 shows the interval time, and Figure 6-6 shows the timing of the timer interrupt operation.Caution Perform the following processing when rewriting CR90 during a count operation. Disable interrupts (TMMK90 (bit 1 of interrupt mask flag register 1 (MK1)) = 1). Disable inversion control of timer output data (TOC90 = 0).If CR90 is rewritten with interrupts enabled, an interrupt request may be issued immediately atthe point of rewrite.Table 6-2. Interval Time of 16-<strong>Bit</strong> Timer 90TCL901TCL900Count ClockInterval TimeAt fX = 10.0 MHzOperation NoteAt fX = 5.0 MHzOperationAt fX = 10.0 MHzOperation NoteAt fX = 5.0 MHzOperation0 0 2 2 /fX 0.4 µs 0.8 µs 2 18 /fX 26.2 ms 52.4 ms0 1 2 6 /fX 6.4 µs 12.8 µs 2 22 /fX 419 ms 839 ms1 0 2 4 /fX 1.6 µs 3.2 µs 2 20 /fX 105 ms 210 ms1 1 Setting prohibitedNote Expanded-specification products only.RemarkfX: System clock oscillation frequencyUser’s Manual U14801EJ3V1<strong>UD</strong> 89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!