--_003_881D0846AFA1463589CAF55E2F2403D4ivp3ghz_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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= --_003_881D0846AFA1463589CAF55E2F2403D4ivp3ghz_ Content-Type: image/gif; name="DIP_select_AD.gif" Content-Description: DIP_select_AD.gif Content-Disposition: attachment; filename="DIP_select_AD.gif"; size=614; creation-date="Wed, 22 Sep 2010 18:27:20 GMT"; modification-date="Wed, 22 Sep 2010 18:27:20 GMT" Content-Transfer-Encoding: base64 R0lGODlhbAB8AIAAAAAAAP///ywAAAAAbAB8AAAC/oyPqcvtD6OctNqLs968+w8eQDIipRim6Wmw geuqsnbWYwnc877Vbat7xXhESfCF8hWXk6NPyYw+WLhgToptwKzHrPcLDot3ubL5Ok4Lh2oxux1+ w7/yebZul+LzzD2/6PfHEyg4Q1goc4i4suil2NjxCNkzqVeJJXmZkal5wdlZ8QkaITo6ZUqGaqia yproqlIKSzIbIhlzU6b62IUEBcqLhCL8Q4KGGExVvAwkC6gIhWMiclZtfY2drb0NbTasbHKsJe6g S0o+HkobvWBeTkEYrz5tgz5vBJ9vJ9+kP8ePr98+f6QItgFYUOA/g6cUwkEIAaIaie8cHmRYMeBC /osNNT7EqAWkG5HtSMYxSYtjGoohVa5EOc3lSJklaZ60mdLjRZwxde70mTHhRqAtiY5hyQDpTaM1 meoBlxRqO6kKxDnrQdVYz6lbq2Z1BHOYUzphmUXMo7RqWUs8xQr92NZsR7hju879+fZsXLZ13eod mveu4Jd705ItvJZv4KB/ATd+PHhmX7mMCU8mtlhy5qSJlxi2W3ni2s9gEe9VDDl0UceROZ/2PLoz oNivZ5u+3Ic27iikKa+mu7lpcDC9Mac+qnv44cvFeSc/rhm6cOnEn7deGtHeVD/a3XD7Dh5brQ/d x1u4Wgv9LPWw2Ltyzwr+LvObstG/j6ka/v35B+Xz/49BAQAAOw== --_003_881D0846AFA1463589CAF55E2F2403D4ivp3ghz_ Content-Type: text/plain; name="ATT00001.txt" Content-Description: ATT00001.txt Content-Disposition: attachment; filename="ATT00001.txt"; size=208; creation-date="Wed, 22 Sep 2010 18:27:20 GMT"; modification-date="Wed, 22 Sep 2010 18:27:20 GMT" Content-Transfer-Encoding: base64 LS0gDQpodHRwOi8vd3d3LnBpY2xpc3QuY29tIFBJQy9TWCBGQVEgJiBsaXN0IGFyY2hpdmUNClZp ZXcvY2hhbmdlIHlvdXIgbWVtYmVyc2hpcCBvcHRpb25zIGF0DQpodHRwOi8vbWFpbG1hbi5taXQu ZWR1L21haWxtYW4vbGlzdGluZm8vcGljbGlzdA0K --_003_881D0846AFA1463589CAF55E2F2403D4ivp3ghz_-- .