>> From: "Alan B. Pearce" >> > The hardware timer will ensure the led is not left with >> > permanent high current drive, resulting in failure of the LED. > >> >> Do you mean an external device or something inside the pic? > >Hi. (I'm not Alan, but... :-) ) > >I read "hardware timer" as using one of the TMR0-3 timers >instead of using software timing loops (that could easily "hang" >with the LED "on" due to some unexpected event). The TMRx >timers could also hang, but that's a bit more unlikely... No but I am :))) What I was referring to was the suggestion to use a 555 or some other form of monostable to get the 20uS pulse. It could be done with the CCP module, but there would be difficulties in changing the frequency of the pulse then. Later on Jason wrote >How would the division return >1/120Hz? It's 8.333.... ms. Well, remember that is also 8333uS and the PIC at 4MHz clock speed has a 1uS instruction period, and others have pointed out that using the 18F series with the PLL enabled can make this 0.25uS with a 4MHz clock. With 10MHz clock and PLL enabled it comes down even more .... Don't get too hung up on the units, convert them to other units more in keeping with the "internal timing units" of the PIC. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads