counts per revolution are common.
On some, there is a third channel
giving a signal once per revolution,
called an index signal. The ones in
mice seem to have a resolution of only
about 30-50 counts per revolution.
However, the friction step-up gearing
increases this dramatically. You can
use them, just couple them mechanically through a gear or most likely a
timing belt to the drive motor or the
arm. You can increase the count and
the accuracy by stepping up the
speed. The electrical interface is
simple; only two inputs are needed.
There is, however, a catch: You should
only count valid transitions. Think
about some chatter on only one
channel — it is not a valid count. There
are integrated circuits such as LSI
Computer Systems, Inc., LS7083/7084
IC to prevent invalid counts. You can
also prevent them in software. The
AN084 from National Instruments,
Sharp Electronics Corp., Chapter 7 —
“Use of Photointerrupters” and
numerous technical notes on
Microchip's website can give you
further insights (they have a quadrature
simulator TB091, a quadrature encoder
interface, and AN899, just to mention
a few).

Walter Heissenberger
Hancock, NH

[#4081 - April 2008]

Color LCD touch screen displays
cost hundreds of dollars while you can
get a used Nintendo DS with one
touch screen and one static screen for
under $50 on eBay or other sources.

How can a Nintendo DS color
display and touch screen be used for a
PIC or PICAXE project?

#1 High volume consumer
products such as cell phones and
portable video games have the
volume to get very competitive prices
and custom function LCD screens.
Similar general-purpose LCD screens
and OEM replacements are available
from other channels.

To salvage and use the LCD
screens for other projects has a
couple of hurdles. Firstly, without the
manufacturer’s datasheet the module

is worthless. It can’t be brought to life
without accurate data timing, etc.
Secondly, a full color screen requires
three times the data flow compared
with a monochrome one, typically this
is eight bits of R, G, and B data. The
data rate for this stream is quite
high ( 20– 30 Mbits/s) and well
beyond an eight-bit microcontroller’s
performance. Thirdly, the flex circuit
supplied on these requires a fine-pitch
connector that is hard to source and a
challenge to solder by hand.

Having said that, it is possible to
get these or similar LCDs to play by
using a helper chip between the
microcontroller (AVR, PIC) and the
LCD. Typically, these are constructed
from a PLD (Programmable Logic
Device) or FPGA (Field Programmable
Gate Array) such as Xylinx, or a high
performance 16-bit microcontroller
such as an ARM device.

If you start with a generic OEM
cell phone LCD — which costs only
$20 from SFE — and has serial data
programming, you could use an
eight-bit microcontroller to drive it.

Here’s some links:

Typical LCD datasheet: http://
tinyurl.com/24xt2q

SFE Nokia serial input color LCD
page: http://tinyurl.com/evep4

SFE “Sinister Seven” LCD Project:

http://tinyurl.com/ytlqo8

Peter Stonard
Campbell, CA

#2 Microchip Technology has a
web-based seminar (they call them
webinars) about graphic color and
monochrome LCDs, their format, and
the PIC24F interface. The files tend to
be rather large, typically 30-50 MB
and can be downloaded to a PC or
run directly in streaming media format.
Search for GrLCD_p1_ 10 or go to
their training section. This is a good
starting point and explains the
different graphics controllers and their
interfaces in broad terms. Usually, at
the end they have pointers to the
other resources which are available,
such as application notes, sample
code, development boards etc.