I need to test the frequency of a clock signal. It should be in the 4 MHz range, but may be +/- about 1 MHz. So I started thinking... What if I take a PIC like the 16F627 and use Timer0 and Timer2 ? I'd do like this: 1. Setup Timer0 for external counting, divider 16 2. Set up Timer2 for a 160 wait and let it use internal clock/4 3. reset Timer0 4. start Timer2 and sleep... 5. Wake up from Timer2 and read Timer0. 6. Timer0 will contain frequency of external clocksignal in MHz with one decimal. 7. put data on output so it can be decoded by a 8 bit driver for 7-segment displays or transform to bcdx3 and send out via 3x4pins for 3 bcd-2-7seg drivers. Max frequency measurable by this would be 25.6 MHz and the lowest would be 0.1 MHz. The internal clock would be about 4 MHz +/- 1 kHz and that won't matter all that much... I only need one decimal accuracy on MHz scale. Sounds reasonable ? Simple and fast. I know It's not accurate, but there is room for so 15 cycle jitter in a 160 cycle wait so I expect it won't fluctuate. KreAture -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body