NEW
20 Tracks Sound Recorder
SD FAT32 Sound Recorder
OLED Frequency Counter ATtiny85
SD Card Data Logger
FAT32 Player ATtiny85/45
CH341 USB TO I2C/SPI/EPP
USB to I2C OLED
USB to LCD
USB Input Output
SD CARD
CH376 USB Picture Frame
SD FAT32 Player PIC12F1822
W25Q64 Flash Recorder
Picture Frame PIC16F690
Color OLED Picture Frame
SD FAT32 TFT Display
Doorbell with SD/EEPROM
SD Talking Clock
SD Sound Recorder
SD FAT32 wav Player
SD Arduino Recorder
Arduino Picture Frame
FREQUENCY COUNTER
AD9833 Waveform Generator
Chrome Browser Counter
Arduino LED MAX7219 Counter
LCD Accurate Counter
OLED Accurate Counter
MilliHertz Counter
PIC Counter For Android
MAX7219 LED Counter
WiFi Frequency Counter
Frequency Generator
OLED Counter PIC12F629
Talking Frequency Counter
TFT Counter PIC16F628A
SSD1306 Counter PIC16F628A
SSD1331 Counter PIC16F628A
Arduino Counter for PC
OLED Arduino Counter
OLED Frequency Counter
TFT 10MHz Counter
PC Counter
LED Counter
Scope Screen Counter
LCD 16 x 2 Counter
LCD Arduino Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter
OBD2
OBD2 RPM meter PIC16F876A
OBD2 Engine Rev Counter
OBD2 Diagnostic app
OSCILLOSCOPE
Logic Analyzer
PIC12F1822 Scope for PC
Arduino Oscilloscope for PC
Arduino OLED Oscilloscope
Android Oscilloscope
TFT Oscilloscope
USB Oscilloscope
THERMOMETER
Thermocouple 1023 Deg
Thermometer For Browser
OLED Thermometer PIC12F629
OLED Room Thermostat
TFT Clock and Thermometer
LED Thermometer
USB Thermometer
Serial Thermometer
Serial Thermostat
USB DS18B20 Sensor
TIMER / CLOCK
Cuckoo Clock
Real Time Clock DS3231
LED TM1637 Timer
OLED Timer Thermometer
TFT Timer Thermometer
LED Timer
LCD Timer
Clock Thermometer
Talking Clock PIC16F628A
Android Talking Clock
WiFi
WiFi, Ethernet
WiFi Thermometer
WiFi ESP8266
USB
IO for Chrome Browser
USB 16x2 LCD
USB TFT display BMP
USB Meter
USB Input-Output
USB Input-Output Android
DATA ACQUISITION
Analogue to USB (CH341)
MCP3201 on Serial Port
PC Analog Input (USB-UART)
SERIAL PORT
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to Serial
OTHERS
Musical Doorbell
Talk to Arduino
HC-SR04 Sensor
OLED Amp Meter
PC digital I/O (no coding)
Analogue Signal to LPT
LCD Display on LPT
Water Softener
Solar Charger
Music, Birthday Card
Code Lock
SMALL PROJECTS  
  Technical Tips  

For signal lower than 5V use high speed comperator: eBay

PIC12F1822 16MHz FREQUENCY COUNTER FOR CHROME BROWSER

The frequency can be displayed in Chrome, Edge and Opera browsers https://developer.chrome.com/en/articles/serial/#browser-support . Run the PIC connected via USB to Serial Adapter, open file counter.html in the browser and click Connect. The html includes javascript.
The PIC12F1822 microcontroller is programmed to count the input frequency during accurate 1 second derived from the 8 MHz crystal. The counter measures the frequency for 0.1sec first, if the frequency is greater than 2MHz TMR0 prescaler divides by 4 to increase the input frequency range to 16MHz with resolution of 4Hz, when the frequency is below 2MHz TMR0 is set for no prescaling and the measurment is with resolution of 1Hz.
The micro controller is powered by 5V output from the USB to UART Adapter. When pluging the module it creates a serial port on the PC which can be found in Device Manager.

usb usbusb

line

PIC12F1822 16MHz FREQUENCY COUNTER USING USB TO UART

Self powered frequency counter plugged into a USB port. The PIC12F1822 microcontroller is programmed to count the input frequency during accurate 1 second derived from the 8 MHz crystal. The counter measures the frequency for 0.1sec first, if the frequency is greater than 2MHz TMR0 prescaler divides by 4 to increase the input frequency range to 16MHz with resolution of 4Hz, when the frequency is below 2MHz TMR0 is set for no prescaling and the measurment is with resolution of 1Hz.
The micro controller is powered by 5V output from the USB to UART module. When pluging the module it creates a serial port on the PC which can be found in Device Manager, set the VB app to connect to that port number. Every second the PIC sends 3 bytes of data to the PC.
The app includes an option for talking the frequency.
PC app is in Visual Studio (VS2010) code and App (EXE) are included.
USB to UART can be bought in Ebay https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2060353.m570.l1313&_nkw=usb+to+uart&_sacat=0 make sure it has 5V output.

vs usbusb

line

TALKING FREQUENCY COUNTER USING USB TO UART

Self powered frequency counter plugged into a USB port. The PIC16F628A microcontroller is programmed to count the input frequency during accurate 1 second derived from the 16 MHz crystal. The micro controller is powered by 5V output from the USB to UART module. When pluging the module it creates a serial port on the PC which can be found in Device Manager, set the VB app to connect to that port number. Every second the PIC sends 3 bytes of data to the PC.
The app includes an option for talking the frequency.
Included a Visual Studio (VS2010) code and App and pic C code for MPLAB X.
USB to UART can be bought in Ebay https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2060353.m570.l1313&_nkw=usb+to+uart&_sacat=0 make sure it has 5V output.

vs usbusb

line

ARDUINO FREQUENCY COUNTER FOR CHROME BROWSER

The frequency can be displayed in Chrome, Edge and Opera browsers https://developer.chrome.com/en/articles/serial/#browser-support . Run the Arduino connected to USB, open file counter.html in the browser and click Connect. The html includes javascript.
Arduino Uno or Nano generates an accurate 1 second time base for the counter by cascading timer0 and timer2. The link between digital inputs 3 and 4 connects the output of timer2, 250 Hz, to input of timer0. The software waits for the output of timer0 to go positive to start the count of frequency input to timer1. Timer1 is a 16 bits timer, it overflows at the count of 2 power of 16, that in turn advances overFlow register. At the end of the 1 second the 16 bit register is recorded. The Arduino then sends to the PC via the USB cable and the Com Port a string of the calculated frequency.
The frequency input at pin 5 is TTL signal levels. The specs recommend input up to 6 MHz.

arduino counter

line

6MHz ARDUINO FREQUENCY COUNTER FOR PC

Arduino Uno or Nano generates an accurate 1 second time base for the counter by cascading timer0 and timer2. The link between digital inputs 3 and 4 connects the output of timer2, 250 Hz, to input of timer0. The software waits for the output of timer0 to go positive to start the count of frequency input to timer1. Timer1 is a 16 bits timer, it overflows at the count of 2 power of 16, that in turn advances overFlow register. At the end of the 1 second the 16 bit register is recorded. The Arduino then sends to the PC via the USB cable and the Com Port 4 bytes of data.
VB6: The Arduino has to be connected to the PC first and then the VB6 app started. The app searches for the Com Port by sending a byte and checking if the byte is echoed. It takes a few seconds.
VS2010: Select COM Port that is connected to the Arduino. Included option for talking frequency.
The frequency input at pin 5 is TTL signal levels. The specs recommend input up to 6 MHz, I tested it at 2 MHz. Included a Visual Basic (VB6) code, Visual Studio 2010 and Arduino sketch.

vs counter

line

SERIAL PORT 1MHz / 100KHz FREQUENCY COUNTERS

1MHz:
Self powered frequency counter plugged into the serial port. Included a Visual Basic (VB6 and VS2005) code and .EXE file, PIC assembly, PIC C code, and a circuit diagram. The PIC16F628A microcontroller is programmed to count the input frequency and transmit it serially to the serial port. The micro controller is powered by the signals of the serial port, so no external power supply is needed. The counter is 20 bit transmitted by the UART in 3 bytes. The crystal can be changed to a ceramic resonator if accuracy isn't essential.
100KHz:
Self powered frequency counter plugged into the serial port. Included a Visual Basic (VB6) code, PIC code, and a circuit diagram. The PIC16F628A microcontroller is programmed to count the input frequency and transmit it serially to the serial port. The microcontroller is powered by the signals of the serial port, so no external power supply is needed. The counter is 17 bit (16 bits + overflow). The crystal can be changed to a ceramic resonator if accuracy isn't essential.
The signal input is connected via the chip comparator to allow sensitivity down to 100mV.
You can read more about serial interface in http://www.beyondlogic.org/spp/serial.htm

You are free to use the circuit diagram and the software with no limitations.
Software includes PIC code and VB6 code.

You can read more about serial interface in http://www.beyondlogic.org/spp/serial.htm
Code is for MPLAB, MPLABX and compilers HI TECH or XC8.
You are free to use the circuit diagram and the software with no limitations.

 

Circuit Description
See also Technical Tips

Pin 4 at the serial port is turned to +12V by the software enabling RTS. It is regulated to 5V by 78L05. The 5V is the supply to the microcontroller.
Pin 3 is at -12V and pin 7 at +12V constantly and they are used to drive RX input between -9V (input HIGH) and +8v (input LOW) . These levels are sufficient to drive the RS242 input.

Pin 12 is the frequency input, input signal has to be TTL type.
Pin 8 is the UART output, it transmits the 20 bit count in three bytes in RS232 format. When pin 8 is high both transistors conduct and voltage at pin 2 of serial port is at -9V.
The other pins are not in use but must be left open circuit.

100mhz c100

Circuit Description
See also Technical Tips

Pin 4 at the serial port is turned to +12V by the software enabling RTS. It is regulated to 5V by 78L05. The 5V is the supply to the microcontroller.
Pin 3 is at -12V and pin 7 at +12V constantly and they are used to drive RX input between -9V (input HIGH) and +8v (input LOW) . These levels are sufficient to drive the RS232 input.

PIC16F628A contains a UART for serial comm and a 16 bit counter.
Input signal can be 0.1 to 5 vollts peak to peak.
Pin 17 is the frequency input, it's the PIC comparator input. Referance voltage to the comparator is 2.5V at pin 1. Output of the comparator at pin 2 is linked to the PIC counter input at pin 12.
Pin 8 is the UART output, it transmits the 16 bit count and overflow in three 8 bit words in RS232 format.
The other pins are not in use but must be left open circuit.



Name:

Comments and questions

Copy the number from the picture It stops net-robots from adding comments.



20.06.2021 - 12:49
Name: Moty
Comment: Diagram added.

20.06.2021 - 03:58
Name: Wing
Comment: Where is the schematic diagram of the Aeduino version?

23.05.2015 - 12:35
Name:
Comment:

07.03.2015 - 00:26
Name: soho
Comment: 78l05 in or out ??

04.03.2014 - 03:57
Name: Carlos
Comment: Obrigado amigo estava a procura de algo assim para aprender muito bom!
01.05.2010 - 18:56
Name: Mustafa Sayan
Comment: Mersi

iconFlag Countermoty22.co.uk  2008-2024