Seeking schematics/plans for decimal to binary (microswitch/relay) selector/controller

I am interested in building a "selector" gadget for devices that take jumpers to select a program, such as this game cartridge where you have 5 jumpers to select program #0-31 (the jumpers represent the binary number):

formatting link
formatting link
formatting link

The selector would have two 7-segment LEDs that display the currently selected program number (0-31), and a couple pushbuttons (+/-) that let you increase/decrease the program #. The device translates the number into binary and turns on/off the appropriate switches or relays which are attached to the jumpers on the device (ie the above game cartridge).

Or I would even like to build a kind of analog to digital converter device which has a potentiometer (for example 100k) which gets translated into an 8-bit number (0-255) and 8 switches get opened/closed that represent the value of the pot. Adding three 7-segment LEDs to display the current value in decimal would be cool and then it could be used as a "selector" as well.

Does anyone know of any plans or schematics out on the Web to construct something like these? (For now I just wire switches to the jumpers.)

Thanks.

Reply to
mad.scientist.jr
Loading thread data ...

formatting link

Yes, an AVR should work. Your requirements are very similar to our project: Two or Four buttons, 3 digits LCD, 4 channels A2D, runtime current 2mA, power down current 50uA. A button cell battery (CR2032) would last 6 months in power down.

See:

formatting link

Reply to
linnix

Why don't you just use a rotary switch which opens and closes four outputs. You can get binary coded decimal or hexadecimal - if you use a hex switch your users have to understand the the sequence

0,1,2,3,4,5,6,7,8,9,A,B.D,E,F.

Farnell stocks both kinds of switch in a variety of formats, and there must be other broad-line distributors who cater to the segment of the market.

It's a lot easier and cheaper than programming a PIVC and wiring up 7- segment displays.

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

This would be an easy project using a 8-pin picmiro (12f508,12F629...) pic12f508 cost about a buck at digkey.com You could use a simple momentary-switch to step through from 0-31 If you already have one of the pic progammers found on the web, here's some code to get you started.

cblock count endc

Init clrf count

main

btfsc GPIO,3 ;loop until switch is cleared goto main incf count,f ;increment count by 1 movf count,w ;copy count to Working Register movwf GPIO ;Send Data to OUTput ports xorlw .31 ;check to see if count is 31 btfss status,z ;If so reset back to Init goto Init ;reset count to zero goto main ;if count is not 31 then to main end

Reply to
maxfoo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.