Using the Keyboard Interrupt (KBI) for the QE Microcontrollers
QE128 Quick Reference User Guide, Rev. 1.0
4-6
Freescale Semiconductor
NOTE
This is the keyboard interrupt service routine. Every time an interrupt is
detected this routine toggles a LED. The VectorNumber_Vkeyboard can be
replaced by the interrupt vector number, this depends if the MCU is a 9S08
or V1. Using this example makes the code fully compatible for either MCU.
void interrupt VectorNumber_Vkeyboard KBI_ISR(void) {
KBI1SC_KBACK = 1; // Clear the KBI interrupt flag
PTCD_PTCD0 ^= 1; // Toggles PTC0
}
4.3.2
Hardware Implementation
This project was developed using the DEMOQE board. No extra hardware is needed.