English
Language : 

MC68HC908AT32 Datasheet, PDF (284/378 Pages) Freescale Semiconductor, Inc – Microcontrollers
Keyboard Interrupt Module (KBD)
Another way to avoid a false interrupt:
1. Configure the keyboard pins as outputs by setting the appropriate DDRG bits in data direction
register G.
2. Configure the keyboard pins as outputs by setting the appropriate DDRH bits in data direction
register H.
3. Write logic 1s to the appropriate port G and port H data register bits.
4. Enable the KBI pins by setting the appropriate KBIEx bits in the keyboard interrupt enable register.
24.5 Low-Power Modes
The WAIT and STOP instructions put the MCU in low-power standby modes.
24.5.1 Wait Mode
The keyboard module remains active in wait mode. Clearing the IMASKK bit in the keyboard status and
control register enables keyboard interrupt requests to bring the MCU out of wait mode.
24.5.2 Stop Mode
The keyboard module remains active in stop mode. Clearing the IMASKK bit in the keyboard status and
control register enables keyboard interrupt requests to bring the MCU out of stop mode.
24.6 Keyboard Module during Break Interrupts
The BCFE bit in the break flag control register (BFCR) enables software to clear status bits during the
break state. See Chapter 11 Break Module (BRK).
To allow software to clear the KEYF bit during a break interrupt, write a logic 1 to the BCFE bit. If KEYF
is cleared during the break state, it remains cleared when the MCU exits the break state.
To protect the KEYF bit during the break state, write a logic 0 to the BCFE bit. With BCFE at logic 0, writing
to the keyboard acknowledge bit (ACKK) in the keyboard status and control register during the break state
has no effect. See 24.7.1 Keyboard Status and Control Register.
24.7 I/O Registers
Two registers control and monitor operation of the keyboard module:
• Keyboard status and control register (KBSCR)
• Keyboard interrupt enable register (KBIER)
24.7.1 Keyboard Status and Control Register
The keyboard status and control register:
• Flags keyboard interrupt requests
• Acknowledges keyboard interrupt requests
• Masks keyboard interrupt requests
• Controls keyboard interrupt triggering sensitivity
MC68HC908AT32 Data Sheet, Rev. 3.1
284
Freescale Semiconductor