Hi Olin, On Wed, Aug 24, 2005 at 07:29:16AM -0400, Olin Lathrop wrote: > > How fast does the LED need to blink or the circuit respond to an external > event? My knee jerk reaction is that an external RC oscillator to run the > instruction clock is not the best answer. I would try to keep the PIC in > sleep for as much of the time as possible. One way is to use the watchdog > to wake up the PIC periodically. On older PICs, the watchdog was a bit of a > pig itself. This has gotten better on some newer PICs but I don't remember > if the 12F629 is one of them. I had a problem like this on a 16F630 which > has the old watchdog timer, and ended up using an external micropower wakeup > timer but running the PIC off its own internal oscillator when woken up. > The external wakeup timer draws something like 300nA average worst case. > Some new PICs have a similar circuit built in, but I know the 12F629 is not > one of them. I tried two experiments. For both I used the WDT set the max prescale value giving a delay of ~2 sec. The first experiment was using the external osc. with R=68k and C=0.0001uF; the measured instruction clock was around 5kHz. During each wake-up the LED is turned on for about 4e-4 sec. (two nop's implimented this delay.) Current draw was very small, around 10uA. The circuit operated for about 30 min. off the initial 3V charge on a 4700uF cap! For the next experiment, I used the 4MHz internal oscillator and a delay subroutine to flash the LED on for 4e-4 sec. The performance in this configuration was much worse than I expected. The current draw was around 92uA and the circuit only ran for two minutes powered by the 4700uF cap. It seems that using the external osc. is necessary to get the minimal current drain with the 12F629 that I want. Using the 12F683 with the 32kHz internal osc. may work just as good and free up an IO pin as well. Thanks for your suggestions Olin. I've attached a schematic to my second post if you're interested. ;) Matthew -- That's the thing about people who think they hate computers. What they really hate is lousy programmers. - Larry Niven and Jerry Pournelle in "Oath of Fealty" -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist