If the 20ns+ pulse can be between 200ns and 1us, then it's no problem at all. Just a few delay routines. Regards, Jim > -------- Original Message -------- > Subject: Re: [Pic] Making a special timer! > From: "Richard R. Pope" > Date: Fri, July 18, 2014 10:39 am > To: "Microcontroller discussion list - Public." >=20 >=20 > 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! >=20 > 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= an > > 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 Behal= f 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 th= e > > code to set up your timer. I don't understand why anyone would want to = use a > > PWM when the timer is so easy and quite accurate. Check this out: > > http://www.libstock.com/projects/view/398/timer-calculator > > > > >=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 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .