Motorola M68HC08 Designer Reference Manual page 14

Usb and ps/2 multimedia keyboard interface reference design
Hide thumbs Also See for M68HC08:
Table of Contents

Advertisement

USB and PS/2 Multimedia Keyboard Interface
1.5.1 USB and PS/2 Detection
1.5.2 PS/2 Main Routine
Designer Reference Manual
14
Freescale Semiconductor, Inc.
PTE3 and PTE4 can be configured as USB D+ and D– pins or as
open-drain I/O pins for PS/2 data and clock lines.
algorithm for distinguishing between a USB and a PS/2 interface.
After power on, the interface protocol is undetermined and can be either
a USB or a PS/2 interface. The firmware first initializes the registers and
the I/O ports. It then performs a 350ms software delay to meet the PS/2
power on delay requirement. The USB engine and the internal USB
pullup resistor are enabled. PTE3 and PTE4 are configured as USB D+
and D– pins with a 1.5K internal pullup at D– pin.
For a low speed USB interface, D+ pin will not be continuously high for
more than 4µs because of the bit stuffing mechanism. The PS/2
interface is determined by 1ms continuously high at D+ pin while the
USB interface is determined by receiving a SETUP token.
After the interface mode is detected. the firmware enters either the PS/2
main routine or the USB main routine.
n PS/2 mode, PTE3 and PTE4 are configured as open-drain I/O pins
I
with 5K internal pullup resistors enabled.
main routine. The main functions of the PS/2 routines are:
Receive commands from host
Respond to received commands
Scan key matrix
Send make code to host if key pressed
Send break code to host if key released
USB and PS/2 Multimedia Keyboard Interface
For More Information On This Product,
Go to: www.freescale.com
Figure 1-7
shows the
Figure 1-8
shows the PS/2
DRM014 — Rev 0
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents