On Thu, Sep 23, 2010 at 2:22 AM, ivp wrote: > Hi all > > I have a project which needs two timing intervals set. I did the > proof-of-concept with a 16F88 but would like to use a 12F675 > in the actual product > > Using the 8 pins of the F88's PortB, each interval was set digitally > with its own 4-way DIP switch. ie B<3:0> and <7:4> ranged 0-F > individually. The value for each nybble is the counter for a 10ms > timer, so Interval1 can be set from 0 to 150ms, and likewise Interval2 > also from 0 to 150ms > > I have two A/D pins free on the 12F and can use those to measure > distinct voltages. That could be done with two 12-way rotary > switches + resistors, possibly using a 12ms timer to get the same > approximate range > > My preference would be to use the 4-way DIP switches initially > and probably replace those with solder bridging pads later once > the client has a better idea of what the optimum settings are > > Referring to the attached drawing, is there an algorithm to determine > the values of the resistors so that the A/D can best discriminate a > voltage which corresponds to the binary setting of the DIP ? Or has > anyone done or seen this done before ? > > TIA > > Joe > > * > * > ********** > Quality PIC programmers > http://www.embedinc.com/products/index.htm > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > That scheme was common with remote controls for portable minidisc/CD players. See http://www.minidisc.org/manuals/sharp_mdmt20_remote_schem.pdf for an example. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .