Hi list, I've been reading some about implementing frequency counters using the PIC's timer functions as counters. I believe I understand the principles but have some fundamental questions. I'll be referring to the F84 for this (though I would probably use the F628). 1) How do I calculate the maximum frequency at the input? As I see it, the frequency at the counter/prescaler could be as high as 33MHz (1/30ns). But at the input of the timer itself it must be 0.5*TCY+40ns (~950kHz for a 4MHz reference), thus the reason for using a prescaler setting. Please correct me if I'm wrong. 2) How do I calculate the resolution? Again, as I understand it the resolution is set by the measuring time. This means that for 100Hz resolution, I would need 10mS measure (gate) time. Now, for a higher prescaler setting the resolution scales accordingly, right? Assuming I only read the 8-bit timer, if I have anything higher than 2.56kHz (256 * 100Hz) the timer will overflow. How would I deal with this? Can I poll the TOIF bit (INTCON.bit2) to see if I need to increase the prescaler? If so, do I need to clear it everytime I poll it? I think I still have more questions, but right now I'm trying to understand the mechanisms. TIA, langue. Make a difference, help support the relief efforts in the U.S. http://clubs.lycos.com/live/events/september11.asp -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body