Atari LETA on a CPLD


This has been a part that's always seemed like something fun to look at, well time to bring it to the front as I accquired a fix-er-upper Rampart PCB that was missing a few parts ( all the GAL's were in place tho' ) .
It's a 3 player trackball version missing one of the two Atari LETA chips on the board, part #137304-2002.

So what the heck, it can't be that complex can it ? It's only a trackball controller should fit easily into a CPLD ?

What is does

The leta is the quadrature decoder, which is basically takes the two outputs from a pair of the trackball sensors and turns them into a value. Counting up when the trackball, or spinner, is moving in one direction and down when moving in the opposite. I'm not going to go into the theory of quadrature encoding but the basics are there are two inputs who's signals change approximately 90' apart from each other. When the CLK signal goes high before DIR the encoder wheel is moving in one direction, when DIR goes high before CLK it's moving in the opposite direction. This is the same theory as how a mouse works, and there's lots of other folks who go into more depth on the subject if you want to do further reading.


Pinout of the LETA

DIR & CLK are pairs of inputs from the quadrature encoder on each axis of the trackball, or spinner.
TEST - dir/clk pass thru' (detailed later)
[A1 & A0] supply the 2 bit counter address
[00] = CLK0/DIR0 [01] = CLK1/DIR1
[10] = DIR2/CLK2 [11] = CLK3/DIR3

/CS is chip select, when low the data for the internal counter selected by A0 & A1 is output onto the DQ pins
DQ0 to DQ7 are the data outputs for the selected counter during a read.
RESOLN - count resolution (detailed later)
CK is the master clock input

Testing a Leta

So first thing to do is pull a LETA from another board and put it into the patented test rig.

Complex stuff all LEDs and wires.This setup alows me to set the input states manually,  clock the chip and visually examine the results. 

On to Page 2 - Counting

Go back to the Main Page