21.07.2015 Views

M16C User Manual.pdf

M16C User Manual.pdf

M16C User Manual.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

______INT InterruptMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER______INT Interrupt________ ________INT0 to INT5 are triggered by the edges of external inputs. The edge polarity is selected using the polarityselect bit.________Of interrupt control registers, 004816 is used both as serial I/O4 and external interrupt INT5 input control________register, and 004916 is used both as serial I/O3 and as external interrupt INT4 input control register. Use theinterrupt request cause select bits - bits 6 and 7 of the interrupt request cause select register (035F16) - tospecify which interrupt request cause to select. After having set an interrupt request cause, be sure to clearthe corresponding interrupt request bit before enabling an interrupt.Either of the interrupt control registers - 004816, 004916 - has the polarity-switching bit. Be sure to set this bitto “0” to select an serial I/O as the interrupt request cause.As for external interrupt input, an interrupt can be generated both at the rising edge and at the falling edgeby setting “1” in the INTi interrupt polarity switching bit of the interrupt request cause select register(035F16). To select both edges, set the polarity switching bit of the corresponding interrupt control registerto ‘falling edge’ (“0”).Figure 1.14.10 shows the Interrupt request cause select register.Interrupt request cause select registerb7 b6 b5 b4 b3 b2 b1 b0Bit symbolIFSR0IFSR1IFSR2IFSR3IFSR4IFSR5IFSR6IFSR7Symbol Address When resetIFSR 035F16 0016Bit nameINT0 interrupt polarityswitching bitINT1 interrupt polarityswitching bitINT2 interrupt polarityswitching bitINT3 interrupt polarityswitching bitINT4 interrupt polarityswitching bitINT5 interrupt polarityswitching bitInterrupt request causeselect bitInterrupt request causeselect bitFunction0 : One edge1 : Two edges0 : One edge1 : Two edges0 : One edge1 : Two edges0 : One edge1 : Two edges0 : One edge1 : Two edges0 : One edge1 : Two edges0 : SIO31 : INT40 : SIO41 : INT5RWFigure 1.14.10. Interrupt request cause select register66

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

Saved successfully!

Ooh no, something went wrong!