Motorola M68HC08 User manual

MOTOROLA.COM/SEMICONDUCTORS
M68HC08
Microcontrollers
DRM055/D
Rev. 0
1/2004
High Data Rate
Wireless USB
Optical Mouse
Solution Using the
MC68HC908QY4
and MC68HC908JB12
Designer Reference
Manual
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA 3
Motorola and the Stylized M Logo are registered trademarks of Motorola, Inc.
DigitalDNA is a trademark of Motorola, Inc.
This product incorporates SuperFlash® technology licensed from SST.
All brand names and product names appearing in this document
are registered trademarks or trademarks of their respective holders. © Motorola, Inc., 2004
High Data Rate Wireless USB Optical Mouse
Solution Using the MC68HC908QY4
and MC68HC908JB12
Designer Reference Manual
by: Dennis Lui
Ernest Chan
Applications Engineering
Motorola Microcontroller Division
Hong Kong
To provide the most up-to-date information, the revision of our documents on
the World Wide Web will be the most current. Your printed copy may be an
earlier revision. To verify you have the latest information available, refer to:
http://motorola.com/semiconductors
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
4 Revision History MOTOROLA
Revision History
Revision History
Date Revision
Level Description Page
Number(s)
January,
2004 N/A Initial release N/A
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA Table of Contents 5
Designer Reference Manual — DRM055
Table of Contents
Section 1. System Overview
1.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4 Transmitter and Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Section 2. RF Front End
2.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3 RF Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 RF Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5 PCB Layout Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Section 3. Universal Serial Bus (USB) Overview
3.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 JB12 USB Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2.1 USB Module Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.2 USB Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.3 USB Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Section 4. Optical Mouse Transmitter
4.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.1 QY4 Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2.2 Optical Mouse Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Section 5. Mouse Transmitter Firmware
5.1 Firmware Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.2 Power Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.3 Data Packet Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3.1 Coding Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3.2 Packet Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3.3 Button Status and Z Displacement Packet . . . . . . . . . . . . . . . . . 24
5.3.4 X-Y Displacements Packet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
6 Table of Contents MOTOROLA
Table of Contents
Section 6. Universal Serial Bus (USB) Receiver
6.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.2 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Section 7. Receiver Firmware
7.1 Firmware Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.2 USB Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.3 Remote Wakeup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.3.1 Wakeup Detection Mechanism. . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.3.2 Power Consideration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.4 ID Updating Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Section 8. Testing and Customization
8.1 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2 Hardware Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2.1 Optical Mouse Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2.2 RF Circuitry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8.3 Firmware Customization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.3.1 Mouse Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.3.2 Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA List of Figures and Tables 7
Designer Reference Manual — DRM055
List of Figures and Tables
Figure Title Page
1-1 System Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3-1 USB Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3-2 USB Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3-3 USB Packet Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4-1 Transmitter Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5-1 Firmware Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5-2 Power Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5-3 Manchester Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5-4 Packet Format for Button and Z Displacement . . . . . . . . . . . . . . . 24
5-5 Start Field. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5-6 Button Status Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5-7 Z Displacement or ID Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5-8 Checksum Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5-9 Packet Format for X-Y Displacements. . . . . . . . . . . . . . . . . . . . . . 25
5-10 Start Field for X-Y Displacement Packet . . . . . . . . . . . . . . . . . . . . 25
6-1 USB Receiver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7-1 Firmware Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7-2 USB Interrupt Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7-3 Setup Routine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7-4 OUT EP0 Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7-5 IN EP0 Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
7-6 Timer Capture Interrupt For Receiver . . . . . . . . . . . . . . . . . . . . . . 34
7-7 Timing Parameters for Packet Detection . . . . . . . . . . . . . . . . . . . . 36
7-8 Detection of Valid Wakeup Packets. . . . . . . . . . . . . . . . . . . . . . . . 36
7-9 JB12 Rejecting Packet-Like Noise
to Prevent False Wakeup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8-1 USB Report for JB12 to Host for the Test Setup . . . . . . . . . . . . . . 40
8-2 Loop Antenna Impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
8 List of Figures and Tables MOTOROLA
List of Figures and Tables
Table Title Page
7-1 Interface 1 Mouse Input Report . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8-1 Tx Matching Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8-2 Rx Matching Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA System Overview 9
Designer Reference Manual — DRM055
Section 1. System Overview
1.1 Introduction
This manual describes a reference design for a high data rate wireless
universal serial bus (USB) optical mouse solution by using the
MC68HC908QY4 and the MC68HC908JB12.
Because of the lower cost, adoption of wireless PC peripherals has been fast
paced. Consumers are quickly recognizing the advantages of using wireless
PC peripherals, which include portability and placement flexibility. However,
there are two major performance issuesin general 27-MHz wireless platforms.
These issues affect wireless mouse applications in particular.
1. The mouse cursor motion tracking speed is slow
2. There is a long legacy time in response to an end-user action
These issues can be resolved by implementation of a new high-speed
transmission link. The tracking speed of the high data rate wireless mouse is
almost doubled and the response time is reduced by half. The performance is
even compatible to a corded mouse in terms of data report rates uploaded to
the PC host from the peripheral device. From the end users point of view, the
overall movement of the mouse can be fully cached up and reflected on the
computer screen without any noticeable delay in cursor response.
The following reference materials are available at:
http://motorola.com/semiconductors
• Schematic diagram
• PCB layout
•PCBGerber
• Bill of materials
• Source code
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
10 System Overview MOTOROLA
System Overview
1.2 Features
Main features of the mouse include:
• A high data rate 27-MHz RF link
• Windows® 98, Windows 2000, and Windows XP compatibility
• User identity code to avoid conflict with other devices
• USB 2.0 low-speed compliance
• 4.8 kbps transmission data rate
• 2 meter communication distance
• 3361 compatible device for RF receiver design
1.3 System Overview
The system consists of:
• A high data rate wireless optical mouse using the MC68HC908QY4
(hereafter referred as QY4)
• A USB receiver using the MC68HC908JB12 (hereafter referred as
JB12).
The QY4 was chosen as the mouse transmitter because it includes:
• An internal oscillator circuit
• An auto wakeup function
The JB12 is suitable for this high data rate wireless optical mouse application
because it has:
• 12-K FLASH memory
• 6-MHz bus processing power
• USB function
• An enhanced timer capture module
NOTE: The traditional track-ball type X-Y detection method was replaced by the
advanceopticalnavigationtechnologythatservesasa non-mechanical motion
estimation.
A block diagram of the system is shown in Figure 1-1.
Windows is a registered trademark of Microsoft Corporation in the United States and other
countries.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

System Overview
Transmitter and Receiver
High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA System Overview 11
Figure 1-1. System Block Diagram
1.4 Transmitter and Receiver
On the transmitter side:
The data generated from a displacement detection / button status in the
mouse application is encoded with a pre-defined serial type protocol
handled by firmware in the MCU. In the RF stage, the encoded data is used
for FSK modulation.
On the receiver side:
The captured data from the RF receiver stage is decoded with a
corresponding packet format used for mouse applications. The final data is
sent to the host through the USB interface.
455 kHz
QUAD COIL
MIXER FSK
DEMODULATOR
LO AMP
xx3361
455 kHz
FILTER
LOOP
ANTENNA
26.59 MHz/
26.64 MHz
MC68HC908JB12
USB PC HOST
USB RECEIVER
MC68HC908QY4
I/O
INPUT
DATA
OUTPUT
WIRELESS OPTICAL MOUSE
DATA
INPUT
I/O
DIRECTION
LOOP
ANTENNA
TWO-STAGE
AMPLIFIER
(DISCRETE)
AMP
CRYSTAL
OSCILLATOR
(DISCRETE)
13.5225 MHz/
13.5725 MHz
FSK
MODULATION
BY SWITCHING
LOADING
CAPACITOR
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
12 System Overview MOTOROLA
System Overview
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA RF Front End 13
Designer Reference Manual — DRM055
Section 2. RF Front End
2.1 Introduction
A high data rate 27-MHz RF link is designed as the wireless communication
media for this application. The RF frequency is determined by the crystal
frequency used at the oscillator circuit stage and there are two selectable
channels for transmission. The transmission data rate is 4.8 kbps.
2.2 Functional Description
The high-frequency carrier signal on the transmitter side is modulated by the
digital encoded data from the QY4 using a FSK modulation scheme. The
modulated RF signal is propagated through free-air space and received by an
integrated chip, the 3361, on the receiver side which includes all mixer, local
oscillator, and demodulator circuits. The demodulated data output is received
by the JB12 for decoding and processing. The data will then be converted to
the USB mouse report format and sent to the host.
2.3 RF Transmitter
The RF transmitter consists of three parts:
• The crystal type oscillator
• The FSK modulation switching circuit
• The RF amplifier
Thecrystaloscillatorworks with a crystal frequency at halfofthetargetchannel
frequencyandthesecondharmonicfrequencyis filteredoutby theRF amplifier
together with a high Q-factor antenna. For example, a 13.5225-MHz crystal is
used for a frequency channel at 27.045-MHz.
The FSK modulation is achieved by changing the loading capacitance at the
crystal with a transistor switching circuit controlled by the encoding data
generated from the MCU. The maximum data rate for a particular FSK
transmission is limited by the RF bandwidth of the system and controlled by the
frequency deviation which represents the logic “0” and logic “1” data. In
general, the frequency deviation should be adjusted proportionally to the
change on the required transmission data rate. Higher data rates require more
bandwidth/ frequency deviation. The frequency deviationforthis4.8-kbpsdata
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
14 RF Front End MOTOROLA
RF Front End
rate wireless mouse application is increased from ±2.5 kHz to ±4.5 kHz which
is controlled by the crystal characteristics.
The gain of the RF amplifier in the final stage should be adjusted to
compensate the gain loss at the oscillator stage with extend bandwidth
operation. Two stages of RF amplifier are used in this reference design to
maintain the performance in communication distance.
2.4 RF Receiver
The RF receiver is implemented by using a single-chip solution (3361
compatible part) which includes:
• A frequency downward conversion mixer
• A local oscillator circuit
• A baseband FSK quadrature demodulation unit
The RF input signal from the antenna, is frequency down converted into an IF
signal at 455 kHz by the mixer and oscillator circuits. The IF frequency value is
equal to the RF input frequency plus or minus the LO input frequency. The
higher frequency componentsshould be filtered out by using a passive IF filter.
The bandwidth should be increased from 15 kHz to 20 kHz to match the data
rate change on the transmitter side.
However, the image frequency component would not be filtered out by the IF
filter. This should be considered in the PCB layout in order to prevent any noise
component at image frequency to be injected into the mixer input. An example
of this would be a noise pattern generated from the MCU.
The frequency used for a 3361 mixer local oscillator is selected by the crystal
connected at the oscillator base input pin. There are two frequency channels
that can be selected to match the transmitter channel.
2.5 PCB Layout Guidelines
Care should be taken in PCB layout in order to avoid any noise generated from
MCU coupling into the RF stage. For example:
• Thepowersupplytraces usedfordigital andanalogcircuit blocksshould
be separated.
• The location of decoupling capacitors should be as close as possible to
device's supply input pins (VDD/VSS or VCC/GND).
•TheV
DD to VSS ground loop area should be reduced to minimize the
magnetic coupling effect.
• The PCB trace loop formed by any input/output (I/O) signal pin should
be kept to a minimum.
• The RF receiver uses a loop antenna formed by using a PCB trace line.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA Universal Serial Bus (USB) Overview 15
Designer Reference Manual — DRM055
Section 3. Universal Serial Bus (USB) Overview
3.1 Introduction
The universal serial bus (USB) is an industry-standard extension to PC
architecture providing a low-cost plug-and-play solution for PC peripheral
devices. It is a serial data link with a high data-transfer rate and device-control
capability. Peripheral USB devices can be configured automatically when
connected to a host because the USB software driver is mapped and loadedin
the operating system (OS) according to the peripheral device class.
The USB driver knows how to communicate with the devices and the USB
devices will report their attributes (using a specific report format called
descriptor) to the host during device configuration. The descriptor is a data
structure with a defined format that describes the device’s capabilities and
resource requirements.
For more detailed information regarding the descriptor format, please refer to
the Universal Serial Bus Specification Revision 2.0 at:
http://www.usb.org/developers/docs
3.2 JB12 USB Module
Features of the JB12 USB module include:
• Universal Serial Bus Specification 2.0 low-speed functions
• 1.5-Mbps data rate
• On-chip 3.3-V regulator
• Endpoint 0 with 8-byte transmit buffer and 8-byte receive buffer
• Endpoint 1 with 8-byte transmit buffer
• Endpoint 2 with 8-byte transmit buffer and 8-byte receive buffer
• USB data control logic
• USB reset options
• Suspend and resume operations with remote wakeup support
• USB-generated interrupts
• STALL, NAK, and ACK handshake generation
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
16 Universal Serial Bus (USB) Overview MOTOROLA
Universal Serial Bus (USB) Overview
3.2.1 USB Module Description
Figure 3-1 shows a block diagram of the USB module. The USB module
managescommunicationsbetweenthehostandtheUSBfunction.Themodule
is partitioned into three functional blocks. These blocks consist of:
• USB transceiver
• USB control logic
• USB registers
Figure 3-1. USB Block Diagram
The USB transceiver provides the physical interface to the USB D+ and D–
data lines. The USB transceiver uses a differential output driver to drive the
USB data signal onto the USB cable. The output swings between the
differential high and low state are well balanced to minimize signal skew.
The USB control logic manages data movement between the CPU and the
transceiver. The control logic handles both transmit and receive operations on
the USB. It contains the logic used to manipulate the transceiver and the
endpoint registers.
The MCU program controls and monitors the USB operation and data transfer
status through the corresponding USB registers.
Please refer to the MC68HC908JB16 Technical Data (Motorola document
order number MC68HC908JB16/D) and to it’s Addendum (Motorola document
order number HC908JB16AD/D) for a more detailed description of each block.
D +
D –
TRANSCEIVER
RCV
VPIN
VMIN
VPOUT
VMOUT
CPU BUS USB REGISTERS
USB
UPSTREAM
PORT
USB
CONTROL
LOGIC
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

Universal Serial Bus (USB) Overview
JB12 USB Module
High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA Universal Serial Bus (USB) Overview 17
3.2.2 USB Connection
The USB devices are connected to the host by a 4-wire cable. The USB signals
are transmitted over two wires (D+ and D–) on each point-to-point segment.
The cable also carries VBUS andGND wires (+5 V and ground) to deliver power
to devices. The USB data lines are required by the USB specification to have
an output voltage between 2.8 V and 3.6 V. The data lines also are required to
have an external 1.5-kΩpullup resistor connected between a data line and a
voltage source between 3.0 V and 3.6 V. Figure 3-2 shows the worst-case
electrical connection for the voltage regulator.
Figure 3-2. USB Connection
For detailed electrical specifications, please refer to Universal Serial Bus
Specification Revision 2.0 at:
http://www.usb.org/developers/docs
3.2.3 USB Protocol
The USB is a polled bus and the physical layers are configured in a tiered star
topology with point-to-point connections between the host and a hub or a
device.All data transfers areinitiatedand controlled bythehoston ascheduled
basis. Each transaction is comprised of up to three packets. Figure 3-3 shows
the USB packet types.
The host will send out a token packet describing the type and direction of
transaction, device address, and endpoint number. The target device will
respond to the token if the address field decoding is a match. The transaction
direction is indicated in the token packet. The source of the transaction sends
a data packet, or indicates there is no information to transfer, and the
destination will respond with a handshake packet indicatingif the transaction is
correct or not.
R1
D+
D–
USB CABLE
LOW-SPEED
TRANSCEIVER
R2 R2
3.3-V
REGULATOR
4.0 V–5.5 V
USB DATA LINES
R1 = 1.5 kΩ ± 5%
R2 = 15 kΩ ± 5%
HOST
OR
HUB
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
18 Universal Serial Bus (USB) Overview MOTOROLA
Universal Serial Bus (USB) Overview
Please refer to the MC68HC908JB16 Technical Data (Motorola document
order number MC68HC908JB16/D) for a detailed description of each packet
format.
Token Packet:
IN
OUT SYNC PID PID ADDR ENDP CRC5 EOP
SETUP
Data Packet:
DATA0 SYNC PID PID DATA CRC16 EOP
DATA1 0–8 BYTES
Handshake Packet:
ACK
NAK SYNC PID PID EOP
STALL
Figure 3-3. USB Packet Types
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

High Data Rate Wireless USB Optical Mouse Solution DRM055
MOTOROLA Optical Mouse Transmitter 19
Designer Reference Manual — DRM055
Section 4. Optical Mouse Transmitter
4.1 Introduction
The features of the high data rate wireless USB optical mouse solution include
an internal oscillator circuit which can generate a clock of 12.8 MHz with no
external components needed. The auto wakeup module generates a periodic
interrupt during stop mode to wake the part up without requiring an external
signal. These features make the QY4 MCU suited for wireless optical mouse
applications.
The main features of the reference design include:
• 27-MHz RF transmitter
• 4.8-kbps transmission data rate
• 800-DPI resolution
• Smart power management
4.2 System Overview
The mouse transmitter consists of:
•TheQY4
• The Agilent optical mouse sensor (ADNS-2030)
• The RF front end
Refer to Figure 4-1 for a block diagram of the system.
NOTE: RF data is transmitted by means of setting and clearing the RF_Data and the
RF_Off pin.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...

DRM055 High Data Rate Wireless USB Optical Mouse Solution
20 Optical Mouse Transmitter MOTOROLA
Optical Mouse Transmitter
Figure 4-1. Transmitter Block Diagram
4.2.1 QY4 Microcontroller
The functions of the QY4 are:
• To get the XY displacement from the sensor
• Detect the Z displacement
• Check button status
• Control the RF circuitry to send out data
• Perform the overall power management
Three standard left, middle, and right buttons together with one button for the
identity device (ID) code are implemented. The ID code can either be stored in
the RAM or in the FLASHof the QY4. When the ID button in the transmitter and
the one in the receiver are pressed, a random ID code is generated at the
transmitter and sent to the receiver. After receiving the new ID code, the
receiver stores it in the FLASH of the receiver MCU.
4.2.2 Optical Mouse Sensor
The ADNS-2030 is a 3-V supply sensor is specially design for wireless optical
mouse applications. The communication between the sensor and the QY4 is
through a serial peripheral interface (SPI) with clock input at the SCLK pin and
bidirectional data interface at the SDIO pin. The power down (PD) pin is used
to power down the sensor when not in use.
AMP
LOOP
ANTENNA
CRYSTAL
OSCILLATOR
(DISCRETE)
13.5225 MHz/
13.5725 MHz
DGND
L
C
R
ID
BUTTONS
PTA5
PTA4
PTA3
PTA0
PTA1/TCH1
PTB2
PTB0
PTB1
PTB3
PTB7
PTB6
PTB5
SCLK
SDIO
PD
RF DATA
RF_OFF
Z-AXIS ENCODER
IR
Z LED
LD3
IR Rx MODULE
MC68HC908QY4
(16-PIN PDIP)
ADNS2003
(16-PIN PDIP)
750
IMAGE
SENSOR
18 MHz
2u2 F
27 K
100 nF
A GND
+
XY_LED
OSC_IN
OSC_OUT
REFA
REFB
R_BIN
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Other manuals for M68HC08
3
Table of contents
Other Motorola Microcontroller manuals

Motorola
Motorola MC68HC05T16 Instruction manual

Motorola
Motorola M-CORE MMC2001 Series User manual

Motorola
Motorola F3030A Instruction Manual

Motorola
Motorola MPC860 PowerQUICC User manual

Motorola
Motorola G24 Guide Instruction Manual

Motorola
Motorola DSP56824ADM User manual

Motorola
Motorola MC9S12DT256 User manual

Motorola
Motorola M68MPBF333 User manual

Motorola
Motorola ColdFire MCF5281 User manual

Motorola
Motorola MPC533 User manual