Browse over 10,000 Electronics Projects using the Page Numbering provided at the bottom of each Page.

A one chip frequency counter with serial output

A one chip frequency counter with serial output

Design for a single chip frequency counter using PIC12F675. It is possible to use the internal RC oscillator, instead of the crystal but the accuracy suffers.
The counter uses the 8 bit counter TMR0. The main loop samples the timer value, subtracts the sample from the last sample and adds the difference to a count. This is done over exactly 2 seconds, done by counting processor cycles, in a loop that cannot be interrupted. TMR0 is configured so that the input is divided by two.

The binary count is converted to BCD and this is output serially at 1200 baud.

GP3 controls if the comparator is used to pre-amplify the signal. if GP3 is high, then GP2 is Freq counter input. if GP3 is low, then GP1 is Freq counter input. It uses the Comparator and Vref set to about 1 volt.

Why serial? With only 8 pins, it is not possible to connect an LCD display using a parallel interface, and my serial LCD works quite well at 1200 baud.

You could use a serial terminal on a PC to capture the frequency.

Visit Here for more.

 

More Articles to Read

Single-Sided USB Charger
Single-Sided USB Charger
A FPGA controlled RGB LED MATRIX for Incredible Effects – the Hardware
A FPGA controlled RGB LED MATRIX for Incredible Effects – the Hardware
Using Nanotimers to Reduce IoT System Power Consumption by an Order of Magnitude
Using Nanotimers to Reduce IoT System Power Consumption by an Order of Magnitude
Replace a microwave’s beeping with the Windows XP startup sound
Replace a microwave’s beeping with the Windows XP startup sound
A DIY Laser Scanning Microscope
A DIY Laser Scanning Microscope
Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor
Reverse-engineering the surprisingly advanced ALU of the 8008 microprocessor
ESP8266 LED lighting: QuinLED v2.6 PCB
ESP8266 LED lighting: QuinLED v2.6 PCB
Switching LVDS Graphics in a Laptop Computer
Switching LVDS Graphics in a Laptop Computer
Teleknitting: TV-based string art
Teleknitting: TV-based string art
DIY Bubble Machine
DIY Bubble Machine
Start your day with Nerf target practice!
Start your day with Nerf target practice!
Teardown of a Peaktech 6225A
Teardown of a Peaktech 6225A

Top




Shares