On Fri, Jul 18, 2014 at 03:20:06AM -0500, Richard R. Pope wrote: > Hello, > I'm replying to myself because it is the part about controlling the= =20 > one second pulse that I just don't know how to do. Do I use a timer or=20 > do I setup a set of delay loops That's a no brainer. Use the timer. >. The more accurate the one second pulse=20 > the more accurate that the frequency being displayed is going to be. A=20 > 4MHz clock means that 1 megacycles are executed in one second. So, you=20 > do the initialization, open the gate for one second, read the pot, wait=20 > for a time that corresponds to the pot setting, send out the reset=20 > pulse, open the gate for one second, and repeat these steps forever.=20 > Correct? Sounds about right. The best long term PIC timer reference out there is Roman Black's precision timing system. Works with the simplest of timers (even Timer 0), is extremely accurate, and he has examples written in C, and a few in assembly if I remember correctly. You can find all of his projects at romanblack.com. The specific one you are looking for is the Zero Error Zero Jitter timing system. Hope this helps, BAJ > Thanks, > rich! > P.S. This looks like an outline for the program. Correct? > rich! >=20 > On 7/18/2014 3:03 AM, Richard R. Pope wrote: > > Joe, > > That is true. Setup a clock the can output a high for one second = on > > demand. Read the POT, output the reset pulse, turn on the one second > > clock that corresponds to the setting of the POT, and do it all over > > again. Is that correct? > > Thanks, > > rich! > > > > On 7/18/2014 2:56 AM, IVP wrote: > >>> I could figure out MPASM but MP C would be much easier > >> It should be simple enough in asm > >> > >> So far there are only a few basic functions - get the clock going, > >> read the pot and do something with the result > >> > >> It's not as though the PIC needs to do a lot of calculations for > >> example, it's just reacting and supervising > >> > >> Joe >=20 > --=20 > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 Byron A. Jeff Chair: Department of Computer Science and Information Technology College of Information and Mathematical Sciences Clayton State University http://faculty.clayton.edu/bjeff --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .