Sounds like a job for linear electronics Think 2 Op-Amps, set up as voltage comparators, each outputs a 1 when the output is beyond it's set point; Something like this {Note that the /|\ is a "Crossover", not a connection!} Double-check me on it as it's late & I am in a rush to get supplies before the Christmas Storm of '98 closes us down here BTW, if the joystick has one end at +5 and the other end at Gnd, omit the 50k resistor there as ground is already handled This would generate 10, 00, 01; For 11 in the middle, swap the connections from the ends of the 10k resistor to the voltage comparators. (You're responsible for power to the Voltage Comparators/OpAmps, just power them from Gnd and +5 Volts - and you may want to buffer them if necessary, unlikely though. ) |\ Gnd O---\/\/\--+-----|+\ 40k | | }------ Bit 0 \ +--|-/ / | |/ 10k \ | / | |\ | +--|+\ | | | }------ Bit 1 +-\/\/\--+-/|\-|-/ | 40k | |/ +5V O-+-\/\/\--+--+ R | | Gnd O---\/\/\--+ 50k Mark, mwillis@nwlink.com Pablo Bleyer Kocik wrote: > > Hi! > I'm currently building a 16F84-based telescope mount control with > step motors and I'm using a gamepad as the main user interface > peripheral. This is a typical Gravis-compatible gamepad, with a nine > position joystick and four buttons. The gamepad is a perfect solution > for my control, it works fine and looks great ;^) . However I'm > looking for a simple converter for the gamepad's joystick; I've used > PC-like circuits (with 555-like monoastables) and comparators with > good results, but this is just too much for the simple 3 position > joystick's stick of each axis (0 Kohms when up, 50 K when middle, 100 > K when down). I need to convert these positions to two bits (10 when > the stick is up, 01 when the stick is down, and 00 (or 11) when the > stick is in it's natural position). Any ideas for a _simple_ circuit > doing this? > > +--+ > +5V O--\/\/\---> | |-> bit0 > R | |-> bit1 > +--+ > > R: 0-50-100 KOhms > > Thanks and happy, happy holidays! Merry Xmas and a prosperous new > year!!! > > -- > Pablo Bleyer Kocik |"The most exciting phrase to hear in science, the > pbleyer | one that heralds new discoveries, is not `Eureka!' > @dgf.uchile.cl | (I found it!) but `That's funny...'" -Isaac Asimov > >