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 90 Rewriting by 16-bit access Disable interrupts (TMMK90 = 1), and disable inversion control of timer output (TOC90 = 0) Rewrite CR90 (16 bits) Wait for more than one cycle of the count clock Clear the interrupt request flag (TMIF90) Enable timer interrupts and timer output inversion (When count clock = 64/fX, CPU clock = fX)TM90_VCT: SET1 TMMK90 ;Timer interrupt disableCLR1 TMC90.3 ;Timer output inversion disableMOVW AX,#xxyyH ;CR90 rewrite value settingMOVW CR90,AX ;CR90 rewritingNOPNOP:NOPNOPCLR1 TMIF90NOP 32 (Wait for 64/fX) Note;Interrupt request flag clearingCLR1 TMMK90 ;Timer interrupt enableSET1 TMC90.3 ;Timer output inversion enableNote Wait for more than one cycle of the count clock after the instruction rewriting CR90 (MOVW CR90, AX)before clearing the interrupt request flag (TMIF90).96User’s Manual U14801EJ3V1<strong>UD</strong>

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

Saved successfully!

Ooh no, something went wrong!