Hello all, Maybe this with give a little more insight. The one second pulse is=20 the gating signal to allow the frequency that is to be counted to be=20 applied to the counters. I don't need laboratory quality accuracy but=20 less than one percent variance would be nice. Less than 1 ppm would be=20 really great. The reset pulse can be anywhere from 20ns to 1us in length. The one=20 second gating pulse comes right after the reset pulse ends. Then after=20 the gating pulse ends you read the pot and set the delay time until the=20 next reset pulse takes place. Yes, I think a pot would be best. The=20 delay function is not required to have any type of precision. So even=20 three or four percent variance is no big deal. And it does give a=20 physical representation of the setting and it is inexpensive. I also=20 have lots of pots laying around. I looked at the datasheets for the f84a=20 and the f628. the 84a doesn't have an ADC and the 628 does. I have both=20 of these PICs. I was thinking of using a 4 MHz resonator or a 4 MHz=20 crystal for more accuracy. Thanks, rich! On 7/18/2014 1:52 AM, NOPE9 YES wrote: > On 2014m07d17, at 23:33, Richard R. Pope wrote: > > Hello all, > I hope someone can help me with this. I would like to output a > pulse for one second. This pulse has to be high for one second. It opens > a gate allowing the frequency to be counted to be applied to the counter > gates. Then the pulse is pulled low and the counting stops. > I want to then output another high pulse of at least 20nS in > length. I want to be able to adjust the delay from the time that the > count pulse goes low and when this pulse is output. It would be nice to > have this pulse occur from say 1 second to never. I.E. the frequency > count can be updated from once a second to it can be held indefinitely. > So for this I would think that a potentiometer being read by an ADC > could be used to control the update time for counting the frequency. A > low count would allow the updating to occur very often and a high > reading would result in no reset pulse being output. I have the picture > in my head but I just don't know how to translate that into software to > control the hardware. > I was thinking that a pic16f628 would be the choice for doing this. > Can someone please spend some time with me and help me with this? I have > hit a wall. > Thanks, > rich! > =97 > > #1 Pulse has to be high for one second plus/minus =85. how much precisio= n ? > #2 At least 20nS in length =85.. is one hour okay ? 20nS to ????? > #3 Most any micro-processor will do this=85.. the precision will depend = on the clock driving the micro-processor. > #4 You can use a potentiometer into an ADC. I guess you would want to t= ranslate the incoming voltage into a logarithmic time function such as t= ime delay =3D n**(ADC-voltage * m). This could be done with a lookup table= .. Instead of a potentiometer , you could have a pair of buttons ( up and d= own ) . Or a digital rotary encoder. I guess the advantage of a pot is th= at it will give you some kind of idea visually what the time delay is. > > If you are doing only one of these , I would recommend using a developmen= t board to save time and effort. With more information, various PIClisters= could give you better advice. I may have a surplus board I could give you= .. > > Gus in Denver > > --=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 .