21.07.2015 Views

M16C User Manual.pdf

M16C User Manual.pdf

M16C User Manual.pdf

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.

Key-Input InterruptMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER2.13.2 Operation of Key-Input InterruptThe following is an operation of key-input interrupt. Figure 2.13.3 shows an example of a circuit that usesthe key-input interrupt, Figure 2.13.4 shows an example of operation of key-input interrupt, and Figure2.13.5 shows the setting procedure of key-input interrupt.Operation(1) Set the direction register of the ports to be changed to key-input interrupt pins to input, and setthe pull-up function.(2) Setting the key-input interrupt control register and setting the interrupt enable flag makes theinterrupt-enabled state ready.__________(3) If a falling edge is input to either KI0 through KI3, the key-input interrupt request bit goes to “1”.P100VREFP101P102P103P104 / KI0I/O portP105 / KI1P106 / KI2P107 / KI3Figure 2.13.3. Example of circuit using the key-input interrupt(1) Enter to stop mode (2) Cancel stop mode(3) Key scan(4) Enter to stop modeKey matrix scanP100 outputP101 outputP102 outputP103 outputP104 to P107inputKey input Key OFF Key ON Key OFF Key ONKey inputinterrupt processingFigure 2.13.4. Example of operation of key-input interrupt436

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

Saved successfully!

Ooh no, something went wrong!