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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 7 8-BIT TIMER/EVENT COUNTER 807.4 Operation of 8-<strong>Bit</strong> Timer/Event Counter 807.4.1 Operation as interval timerThe interval timer repeatedly generates an interrupt at a time interval specified by the count value preset in 8-bitcompare register 80 (CR80).To operate 8-bit timer/event counter 80 as an interval timer, settings must be made in the following sequence. Disable operation of 8-bit timer counter 80 (TM80) (TCE80 (bit 7 of 8-bit timer mode control register 80(TMC80)) = 0). Set the count clock of 8-bit timer/event counter 80 (see Table 7-4). Set a count value in CR80. Enable the operation of TM80 (TCE80 = 1).When the count value of 8-bit timer counter 80 (TM80) matches the value set in CR80, TM80 is cleared to 0 andcontinues counting. At the same time, an interrupt request signal (INTTM80) is generated.Table 7-4 shows the interval time, and Figure 7-4 shows the timing of the interval timer operation.Cautions 1. Stop the timer operation before rewriting CR80. If CR80 is rewritten while the timeroperation is enabled, a match signal may be generated immediately at the point of rewrite(an interrupt request will be generated if interrupts are enabled).2. If setting the count clock to TMC80 and enabling the operation of TM80 are performed at thesame time with an 8-bit memory manipulation instruction, the error one cycle after the timerhas been started may exceed one clock. To use 8-bit timer/event counter 80 as an intervaltimer, therefore, make the settings in the above sequence.Table 7-4. Interval Time of 8-<strong>Bit</strong> Timer/Event Counter 80TCL801 TCL800 Minimum Interval Time Maximum Interval Time ResolutionAt fX = 10.0 MHzOperation NoteAt fX = 5.0 MHzOperationAt fX = 10.0 MHzOperation NoteAt fX = 5.0 MHzOperationAt fX = 10.0 MHzOperation NoteAt fX = 5.0 MHzOperation0 0 1/fX 100 ns 200 ns 2 8 /fX 25.6 µs 51.2 µs 1/fX 100 ns 200 ns0 1 2 8 /fX 25.6 µs 51.2 µs 2 16 /fX 6.55 ms 13.1 ms 2 8 /fX 25.6 µs 51.2 µs1 0 TI80 input cycle 2 8 × TI80 input cycle TI80 input edge cycle1 1 TI80 input cycle 2 8 × TI80 input cycle TI80 input edge cycleNote Expanded-specification products only.RemarkfX: System clock oscillation frequencyUser’s Manual U14801EJ3V1<strong>UD</strong> 101

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

Saved successfully!

Ooh no, something went wrong!