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 Key-Input Interrupt2.13.1 OverviewKey-input interrupt occurs when a falling edge is input to P104 through P107. The following is an overviewof the key-input interrupt:(1) Enabling/disabling the key-input interruptThe key-input interrupt can be enabled and disabled using the key-input interrupt register. The keyinputinterrupt is affected by the interrupt priority level (IPL) and the interrupt enable flag (I flag).(2) Occurrence timing of the key-input interruptWith key-input interrupt acceptance enabled, pins P104 through P107, which are set to input, become__________key-input interrupt pins (KI0 through KI3). A key-input interrupt occurs when a falling edge is input to akey-input interrupt pin. At this moment, the level of other key-input interrupt pins must be “H”. Nointerrupt occurs when the level of other key-input interrupt pins is “L”.(3) How to determine a key-input interruptA key-input interrupt occurs when a falling edge is input to one of four pins, but each pin has the samevector address.Therefore, read the input level of pins P104 through P107 in the key-input interrupt routine to determinethe interrupted pin.(4) Registers related to the key-input interruptFigure 2.13.1 shows the memory map of key-input interrupt-related registers, and Figure 2.13.2shows key-input interrupt-related registers.004D16Key input interrupt control register(KUPIC)03F616Port P10 direction register (PD10)03FE16Pull-up control register 2 (PUR2)Figure 2.13.1. Memory map of key-input interrupt-related registers434

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

Saved successfully!

Ooh no, something went wrong!