circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

June 2005, Issue 179

Precision Frequency Meter
Cypress PSoC High Integration Challenge 2004 Contest Winner


FREQUENCY MEASUREMENT

In Analog mode, the AC-coupled and AGND-biased frequency input is fed to the high comparator (as used for time synchronization processing in Time mode). The comparator’s reference changes to 0.5 VCC (AGND) so that it generates a digital version of the input signal. The comparator output is fed out of a pin and fed externally to a digital input.

In Digital mode, the AC-coupled and AGND-biased frequency input goes directly to another digital input. The digital input signal is fed to the clock of the InputDivider counter (8 bits). This counter also has an ISR to extend it in software to a 24-bit counter. The InputDivider terminal count controls the capture enables of the ClockCounter, which allows the exact time of the start and end of the input signal sampled cycles to be recorded. This hardware setup enables the software to know how many input signal cycles were sampled and the exact number of reference clock cycles that these input signal cycles took.