Bob Ammerman wrote: > > ----- Original Message ----- > From: "embedded engineer" > To: > Sent: Wednesday, May 09, 2001 5:13 PM > Subject: Re: [EE]: adding an external counter > > > You bring up some good points. We already have RB0 connected in > > parallel with USART RX for wakeup. I guess they could be or-ed or use > > RB-change. A bigger problem though is reading T1. On the flash PIC > > 16F873 it cannot be done as it can modify the contents of T1 itself. > > That would corrupt the real time clock. See the errata for 16F873 for > > example. > > Would this work around the T1 problem: > > Directly read (using BTF instructions) the port pin used to clock the T1 > timer, watching for the appropriate edge to go by (either 0->1 or 1->0, > whichever applies), then read T1 immediately thereafter. To get the count. Hmm... good point. Microchip says there is no workarround, but why not? I might give that a try if I need. That's kind of what I am doing with another unit that is not quite so power frugal. On T1 int (1/sec) I set a global flag. In my code I watch the flag, reset it, count until set again. But the PIC is awake for about 2 seconds :( Thanks, David Koski -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.