English
Language : 

MC908AS60ACFU Datasheet, PDF (304/414 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Keyboard Module (KBI)
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-consumption 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 13 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
The following registers control and monitor operation of the keyboard module:
• Keyboard status and control register (KBSCR)
• Keyboard interrupt enable register (KBIER)
MC68HC908AZ60A • MC68HC908AS60A • MC68HC908AS60E Data Sheet, Rev. 6
304
Freescale Semiconductor