Rudy Moore wrote: > > > to a standard keyboard connector. One of the more interesting features > > about this chips is that it has an 8-channel A/D converter which could > > be used to read a mini-joystick. I have the neccesary software and > > Hmmm.. I don't really think you need an A/D to read a joystick. Just do > it the way the Apple II did it (with a slight twist). Connect the > potentiometer to one of the bidirection I/O lines of the PIC - the > other end to +5. Also connect a cap from the same I/O line to ground. > > Now, programatically, output a zero on the IO line. This has the effect > of "clearing" the capacitor. Return the line to high-Z (make it an input), > and read that line until it goes "high". Size the capacitor (and the > potentiometer) to produce a charge time that is easy to count with > the PIC. To make it a little more accurate, try using a schottky buffer > on the input. > > Anyway, that's the gist. If we want to make it cheap, this trick will save > $1 in A/D costs... If you need more information, e-mail me. > > Rudy Rudy, You are totally correct. I have forgotten about this method for reading a potentiometer.. so in that case, the Microchip 16c64 can be used instead (basically everything the 16c74 has to offer minus the 8-channel A/D). -Mike :)+< ps. Thanks for the programming tip...
From Wear-Hard Mailing list Archive (WH)
Maintained by R. Paul McCarty
Archive created with babymail