Dan Michaels said: > Dean wrote: > > > ....... > > Good questions you ask Phillip, > > no extra external components are necacary if I can mearly find out what > >the wake up delay is with an acuracy of ~100ns (or ~100 clk cycles), unless > >this delay can vary greatly dependent on temperature and voltage or other > >variables, this is all I need to compensate for. Another reason I dont want > >to include another chip is that Im trying to make this circuit as physically > >compact and simple as possible. > > > > Yeah, isn't it **always** that way! You probably cannot do it here, > but running a PIC off a 32.768 Khz xtal sucks only about 15 uA, and > any Li battery will operate it for a year or three. > > Another scheme - the one I would try if I were doing it - would be > to go with a 28-pin PIC, and use a 32 Khz xtal on Timer1 for the > RTC, and whatever xtal I wanted on the nml oscillator. After wakeup, > interrogate Timer1 to see how long it has been since the wakeup > interrupt occurred. With this, it doesn't matter how long the main > xtal takes to fire up. > > Would be interesting to know if the std xtal oscillator fire up > time repeats to within 100 nsec. Let's see, for a 4 Mhz xtal, for > instance, 100 nsec is about 40% of 1 cycle. Who knows??????? > > - DanM > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements > Sorry, a small typo on my last mail, I meant to say: ~100us which is ~100 instructions... [NOT ns] I guess that the important part of this question, how repeatable is the wake up from sleep timing of the chip... Dean <=== Original post ===> Has anyone measured how long it takes for a PIC to execute the first instruction after a wake up from sleep by external interrupt? The Microchip manuals quote 1024 instructions, but Im guessing there would be additional delay as the chip waits for the crystal to start oscilating. The code that is executed after the wake up is time critical, and I need to compensate for delay. Im running a 16F84, 4.194Mhz crystal, and interrupt from RB0. Any ideas would be apreciated. <=====================> -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements