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 6 16-BIT TIMER 906.4.2 Operation as timer output16-bit timer 90 can invert the timer output repeatedly each time the free-running counter value reaches the valueset to CR90. Since this counter is not cleared and holds the count even after the timer output is inverted, the intervaltime is equal to one cycle of the count clock set in TCL901 and TCL900.To operate 16-bit timer 90 as a timer output, the following settings are required.• Set P30 to output mode (PM30 = 0).• Reset the output latch of P30 to 0.• Set the count value in CR90.• Set 16-bit timer mode control register 90 (TMC90) as shown in Figure 6-7.Figure 6-7. Settings of 16-<strong>Bit</strong> Timer Mode Control Register 90 for Timer Output OperationTOD90 TOF90 CPT901 CPT900 TOC90 TCL901 TCL900 TOE90TMC90− 0/1 0/1 0/1 1 0/1 0/1 1TO90 output enableSetting of count clock (see Table 6-2)Inversion enable of timer output dataCaution 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, the output status of theTO90/P30 pin is inverted. This enables timer output. At that time, the TM90 count continues and an interrupt requestsignal (INTTM90) is generated.Figure 6-8 shows the timing of timer output (see Table 6-2 for the interval time of 16-bit timer 90).Figure 6-8. Timer Output TimingCount clocktTM90 count value0000H 0001HN FFFFH 0000H 0001HNCR90N N N N NINTTM90TO90 NoteInterruptacknowledgmentInterruptacknowledgmentTOF90Overflow flag setNote The TO90 initial value becomes low level during output enable (TOE90 = 1).RemarkN = 0000H to FFFFHUser’s Manual U14801EJ3V1<strong>UD</strong> 91

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

Saved successfully!

Ooh no, something went wrong!