Bob, OK. But how do I do this? I want to put out a one second high pulse=20 and then pull it low. Then I want to wait for 15 seconds. Next I want to=20 output a high for at least 20ns. Output the one second pulse, wait for=20 15 seconds, output the 20+ns pulse, output the one second pulse, and=20 continue doing this forever. Thanks, rich! P.S. I will eventually add an ADC to control how long we wait before we=20 output the 20+ns reset pulse and then the one second gating pulse. rich! On 7/18/2014 10:09 AM, Bob Ammerman wrote: > Why are we talking about timers at all? It is a pain in the next to get a= n > instruction cycle accurate pulse when using a timer. It is much easier to > generate a pulse of an exact number of instruction cycles using a delay > loop. > > ~ Bob Ammerman > RAm Systems > > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf = Of > Allen Mulvey > Sent: Friday, July 18, 2014 10:40 AM > To: 'Microcontroller discussion list - Public.' > Subject: RE: [Pic] Making a special timer! > > MikroElektronika has a free Timer Calculator that you can use to get the > code to set up your timer. I don't understand why anyone would want to us= e a > PWM when the timer is so easy and quite accurate. Check this out: > http://www.libstock.com/projects/view/398/timer-calculator > > --=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 .