2
Mouse Optics
The of Z-wheel motion is detected using the traditional
method by decoding the quadrature signal generated by
optical encoder. Two phototransistors
are connected in a sourcefollower configuration. An
infrared LED shines, causing the phototran-sistors to
turn on. In between the phototransistors and LED is a
pinwheel that turns on the mouse ball rollers. The fan of
this pinwheel is mechanically designed to block the in-
frared light such that the phototran-sistors are turned on
and off in a quadrature output pattern. Every change in
the phototransistor outputs represents a count of wheel
movement. Comparing the last state of the optics to the
current state derives direction information. As shown in
Figure 1, traveling along the quadrature
signal to the right produces a unique set of state tran-
sitions, and traveling to the left produces another set
of unique state transitions. For a lower power system
solution, using a mechanical z-wheel is recommended
instead of a Z LED and Optical Encoder combination.
Mouse Buttons
Mouse buttons are connected as standard switches.
These switches are pulled up by the pull up resistors
inside the microcontroller. When the user presses a
button, the switch will be closed and the pin will be
pulled LOW to GND. A LOW state at the pin is interpreted
as the button being pressed. A HIGH state is interpreted
as the button has been released or the button is not
being pressed. Normally the switches are debounced in
fi rmware for 15–20 ms. In this reference design there are
three switches: left, Z-wheel, and right.
Introduction to the CY7C63743-PXC
The CY7C63743-PXC is an 8-bit RISC microcontroller
with an integrated USB Serial Interface Engine (SIE). The
architecture executes general-purpose instructions that
are optimized for USB applications. The CY7C63743-PXC
has a built-in clock oscillator and timers, as well as pro-
grammable drive strength, and pull-up resistors on each
I/O line. High performance, low-cost human interface
type computer peripherals can be implemented with a
minimum of external components and fi rmware eff ort.
Figure 1. Optics Quadrature Signal Generation.
Infrared
LED
Photo-
transistors
Q1.1 output
Q1.3 output