Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

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

G-code controlled drawing plotter
G-code controlled drawing plotter
An Arduino round word clock
An Arduino round word clock
The Sandwich-o-Matic will make your lunch automatically
The Sandwich-o-Matic will make your lunch automatically
Scalar Network Analyser Jr
Scalar Network Analyser Jr
An Arduino-controlled automated whiskey distillery
An Arduino-controlled automated whiskey distillery
The Rex800 looks like a dinosaur Terminator
The Rex800 looks like a dinosaur Terminator
Home Environment Monitor
Home Environment Monitor
Understanding the Operation of the Frequency Synthesizer in Maxim’s RF Transceivers
Understanding the Operation of the Frequency Synthesizer in Maxim’s RF Transceivers
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
Noisy ESP8266
Noisy ESP8266
Noisy ESP8266
Noisy ESP8266
App note: Noise analysis for high-speed op amps
App note: Noise analysis for high-speed op amps
Skill Sunday: Arrays
Skill Sunday: Arrays
App note: Infrared remote control implementation with MSP430FR4xx
App note: Infrared remote control implementation with MSP430FR4xx
Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display

Top


Shares