> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of IVP > Sent: 13 June 2012 11:44 > To: Microcontroller discussion list - Public. > Subject: [PIC] RC oscillator calculation >=20 > Hi all, >=20 > I've got a PIC project with a speed control that is a pot as the R in RC = mode >=20 > One option I would like is to be able to set a mid-point frequency such t= hat > moving the pot fully counter-clockwise will be the same ratio as slow as = fully > clockwise is as fast >=20 > The equation would be x * (1/y) < x > x * y >=20 > For example, in the range 2 to 32, 8 (=3Dx) is the 'midpoint' and y =3D 4 >=20 > 2 is 8 * 1/4 and 32 is 8 * 4 >=20 > How would I (can I) resolve the equation to find 'x', the midpoint, if I = have > just the range, which in this case is 500kHz to 4100kHz ? >=20 > I can guess at say 1400kHz. 1400/500 =3D 2.8. 2.8 * 1400 =3D 3920, which = is close > but there must be a better way >=20 SQRT(500kHz * 4100kHz) =3D 1431.78kHz Cheers Mike =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .