Motorola M68HC08 Designer Reference Manual
Motorola M68HC08 Designer Reference Manual

Motorola M68HC08 Designer Reference Manual

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

Quick Links

Freescale Semiconductor, Inc.
USB and PS/2
Multimedia Keyboard
Interface
Reference Design
Designer Reference
Manual
M68HC08
Microcontrollers
DRM014/D
Rev. 0.0, 3/2003
MOTOROLA.COM/SEMICONDUCTORS
For More Information On This Product,
Go to: www.freescale.com
Table of Contents
loading

Summary of Contents for Motorola M68HC08

  • Page 1 Freescale Semiconductor, Inc. USB and PS/2 Multimedia Keyboard Interface Reference Design Designer Reference Manual M68HC08 Microcontrollers DRM014/D Rev. 0.0, 3/2003 MOTOROLA.COM/SEMICONDUCTORS For More Information On This Product, Go to: www.freescale.com...
  • Page 2 Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com...
  • Page 3 Freescale Semiconductor, Inc. USB and PS/2 Multimedia Keyboard Interface Reference Design Designer Reference Manual — Rev 0 by: Derek Lau Motorola Ltd Hong Kong DRM014 — Rev 0 Designer Reference Manual MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 4 Freescale Semiconductor, Inc. Designer Reference Manual DRM014 — Rev 0 MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 5: Table Of Contents

    Schematics ........32 Section 2. Glossary DRM014 — Rev 0 Designer Reference Manual MOTOROLA Table of Contents For More Information On This Product, Go to: www.freescale.com...
  • Page 6 Freescale Semiconductor, Inc. Table of Contents Designer Reference Manual DRM014 — Rev 0 Table of Contents MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 7: Section 1. Usb And Ps/2 Multimedia Keyboard Interface

    For the full MC68HC908JB8 specification, please refer to the data sheet, Motorola order number: MC68HC908JB8/D. 1.2 Overview The Motorola MC68HC908JB8 is a member of the HC08 Family of microcontrollers (MCUs). The features of the MC68HC908JB8 include a configured Universal Serial Bus (USB) or PS/2 interface, which makes this MCU suited for personal computer Human Interface Devices (HID), such as mice and keyboards.
  • Page 8: 44-Pin Qfp Mc68Hc908Jb8 Features

    5 – Clock (USB D + pin) PS/2 Plug 6 – NC Figure 1-2. USB and PS/2 Connections Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 9 (Power, Wake and Sleep). Figure 1-5 shows the key matrix for multimedia keyboard with function key. DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 10 > PTA3 CTRL “ PTA4 ‘ PTA5 Caps PTA6 Scrl PTA7 WAKE Pause Figure 1-4. 107-Key Matrix Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 11 > PTA6 SLEEP Down < PTA7 Lctrl WAKE JPN5 JPN4 JPN2 Pause Figure 1-5. Multimedia Key Matrix DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 12: Firmware Description

    J3 and J7 contain all the signals for the MC68HC908JB8 to enter monitor mode for In-Circuit Programming. The ICP requires J3 and J7 to be connected with a cable to the ICP adaptor board, which is plugged-into the M68HC08 Serial Programmer (M68SPGRM08) (see Figure 1-6).
  • Page 13 D+ HIGH FOR 1ms ? PS/2 SETUP DETECTED ? OVER 10 SECONDS ? Figure 1-7. USB and PS/2 Detection DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 14 Send make code to host if key pressed • Send break code to host if key released Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 15 SEND MAKE CODES FOR KEYS PRESSED SEND BREAK CODES FOR KEYS RELEASED Figure 1-8. PS/2 Main Routine DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 16 Communications steps are shown as below: 1. Host waits until no auxiliary device transmission is in progress. Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 17 KBD_IN is the IRQ1 interrupt routine for receiving data from host. The interrupt is configured to execute when a falling edge at the PTE4 (Data) pin is detected. DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 18 Both the host and the keyboard may send commands to each other. The keyboard transmits an acknowledge ($FA) after receiving a valid Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 19 Table 1-3. Keyboard to Host Commands Code Description Implemented Keyboard detection or overrun error Basic assurance test passed Echo Acknowledge Resend DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 20 $E0, $F0, $28 AC Reflesh $E0, $20 $E0, $F0, $20 AC Bookmarks $E0, $18 $E0, $F0, $18 Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 21 AC Local Browser $E0, $40 $E0, $F0, $40 AC Consumer Control Configuration $E0, $50 $E0, $F0, $50 DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 22 USB IDLE FOR SUSPEND DEVICE RESUME FROM 6 ms ? HOST ? Figure 1-11. USB Main Routine Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 23 The firmware first distinguishes the kinds of control transfers and does the corresponding preparation for the next stage. DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 24 CLEAR EP2 TX FLAG RESUME FORM CLEAR RESUME FLAG HOST? RETURN FROM INTERRUPT Figure 1-12. USB Interrupt Routine Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 25 1. COPY DATA TO BUFFER VALID DATA 2. PROCESS OUT DATA RETURN RETURN STALL Figure 1-14. OUT EP0 HANDLER DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 26 Table 1-7. Consumer Page HID Controls in Windows ME and 2000 Management Control USAGE USAGE NAME DATA TYPE Power Relative Sleep Relative Wake Relative Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 27 Interface 0 will issue 8-byte input reports that are identical to the standard keyboard boot protocol report (see Table 1-9) as documented DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 28 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Report ID = 1 Power Wake Sleep Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 29: Firmware Files

    Firmware is compiled under CASM08Z.EXE ver 3.16 from P&E Microcomputer Systems, Inc. Table 1-14 summarizes the functions of each firmware files: DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 30: Test Description

    1.8.1 Hardware • Leave unused row and column lines unconnected since they are pulled high by internal resistors. Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 31: Extra Features

    Keyboard Scan Code Specification from Microsoft Support for Enhanced Keyboard Features under Windows 2000 and Windows ME USB HID Usage Table DRM014 — Rev 0 Designer Reference Manual MOTOROLA USB and PS/2 Multimedia Keyboard Interface For More Information On This Product, Go to: www.freescale.com...
  • Page 32: Schematics

    Freescale Semiconductor, Inc. USB and PS/2 Multimedia Keyboard Interface 1.11 Schematics Figure 1-16. Keyboard Schematics Designer Reference Manual DRM014 — Rev 0 USB and PS/2 Multimedia Keyboard Interface MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 33: Section 2. Glossary

    — The set of wires that the CPU or DMA uses to read and write memory locations. addressing mode — The way that the CPU determines the operand address for an instruction. The M68HC08 CPU has 16 addressing modes. ALU — See “arithmetic logic unit (ALU).”...
  • Page 34 — An instruction that causes the CPU to continue processing at a memory location other than the next sequential address. break module — A module in the M68HC08 Family. The break module allows software to halt program execution at a programmable point in order to enter a background routine.
  • Page 35 CPU registers — Memory locations that are wired directly into the CPU logic instead of being part of the addressable memory map. The CPU always has direct access to the information in these registers. The CPU registers in an M68HC08 are: •...
  • Page 36 Freescale Semiconductor, Inc. Glossary direct memory access module (DMA) — A M68HC08 Family module that can perform data transfers between any two CPU-addressable locations without CPU intervention. For transmitting or receiving blocks of data to or from peripherals, DMA transfers are faster and more code-efficient than CPU interrupts.
  • Page 37 0 — A voltage level approximately equal to the ground voltage (V low byte — The least significant eight bits of a word. low voltage inhibit module (LVI) — A module in the M68HC08 Family that monitors power supply voltage.
  • Page 38 MCU features. MCU — Microcontroller unit. See “microcontroller.” memory location — Each M68HC08 memory location holds one byte of data and has a unique address. To store information in a memory location, the CPU places the address of the location on the address bus, the data information on the data bus, and asserts the write signal.
  • Page 39 — The two opposite logic levels, logic 1 and logic 0, which correspond to two different voltage levels, V and V polling — Periodically reading a status bit to monitor the condition of a peripheral device. DRM014 — Rev 0.0 Designer Reference Manual MOTOROLA Glossary For More Information On This Product, Go to: www.freescale.com...
  • Page 40 The contents of ROM must be specified before manufacturing the MCU. SCI — See "serial communication interface module (SCI)." serial — Pertaining to sequential transmission over a single line. Designer Reference Manual DRM014 — Rev 0.0 Glossary MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 41 (SCI) — A module in the M68HC08 Family that supports asynchronous communication. serial peripheral interface module (SPI) — A module in the M68HC08 Family that supports synchronous communication. set — To change a bit from logic 0 to logic 1; opposite of clear.
  • Page 42 Z — The zero bit in the condition code register of the CPU08. The CPU08 sets the zero bit when an arithmetic operation, logical operation, or data manipulation produces a result of $00. Designer Reference Manual DRM014 — Rev 0.0 Glossary MOTOROLA For More Information On This Product, Go to: www.freescale.com...
  • Page 43 Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com...
  • Page 44 All operating parameters, including “Typicals” must be validated for each customer application by customer’s technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as...

Table of Contents