OLED Bitmap Image
OLED Arduino Counter
OLED Timer Thermometer
OLED Frequency Counter
Android Oscilloscope
OBD2 Engine Rev Counter
OBD2 Diagnostic app
TFT Clock and Thermometer
WiFi, Ethernet
WiFi Thermometer
WiFi ESP8266
Doorbell with SD / EEPROM
SD FAT16/32 for .bmp
PETIT FAT bmp Display
TFT Timer, Thermometer
TFT Oscilloscope
SD Talking Clock
Android Talking Clock
SD Sound Recorder
SD FAT32 wav Player
SD Arduino Recorder
LED Thermometer
LED Timer
LCD Timer
TFT 10MHz Counter
100KHz Counter For PC
1MHz Counter For PC
8 Digits LED Counter
Scope Screen Counter
LCD 16 x 2 Counter
LCD Arduino Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter
USB TFT display BMP
USB DS18B20 Sensor
USB Thermometer
USB Meter
USB Oscilloscope
USB Input-Output
USB Input-Output Android
USB 16x2 LCD
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
MCP3201 on Serial Port
Serial Thermometer
Analogue Signal to Serial
Serial Thermostat
MCP3201 on LPT
Analogue Signal to LPT
LCD Display on LPT
Water Softener
HP Stream 7 docking
3.7V to 5V
Solar Charger
Infrared Decoder
PIC Music
Code Lock
Code Lock with LCD
HOME   Technical Tips

see also TFT Counter , LED Counter, OLED Counter

Updated 3/4/2017
Counter uses PIC16F628A . Included C code and circuit diagram. The LCD and driver module is a 2 lines 16 characters, it has 14 way connector. The LCD is driven by 4 bits data bus.
The frequency is displayed on line 1 by 7 digits with leading zeros removed down to 3 digits. Signal input is a TTL type. The time base is generated by the 32768Hz crystal oscillator.
The CPU frequency is 4MHz from the internal oscillator.
The counting resolution is 1 Hz for frequencies up to 1 MHz and 8 Hz for frequencies over 1 MHz.
The counting is first for a period of 1 second with resolution of 8 Hz and if the frequency is over 1 MHz it is displayed. If the frequency is less than 1MHz the counting is repeated for a period of 2 seconds with resolution of 1 Hz and then displayed.
I tested the counter at up to 2MHz, I don't have the means to test higher frequencies.
Period is displayed on line 2. The period is calculated. For frequencies greater than 1000Hz the display is ns and for less than 1000Hz the display is in us (micro sec).

see also Frequency Counter for ANDROID

The Arduino 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 over-flow register. At the end of the 1 second the 16 bit register is recorded. The Arduino then calculates the frequency and period and displays them on the LCD.
LCD display and driver has 14 way connector, 10 connections are used, 4 bits data bus is selected. There is a big selection of LCD modules, and they are very similar in characteristics . The LCD module has to be HD44780 compatible.
The frequency input is TTL signal levels, for low signal a video amp has to be added. The spects recommend input up to 6 MHz, I tested it at 2 MHz.

You are free to use the circuit diagram and the software with no limitations.

Circuit Description
See also Technical Tips

The crystal is a low power 32,768 Hz watch crystal.
Supply is 5V +/-10%. Input signal is TTL levels.
Contrast trimmer can set contrast from zero to max, set the trimmer to about middle to start with.
LCD display and driver has 14 way connector, 10 connections are used, 4 bits data bus is selected. There is a big selection of LCD modules, and they are very similar in characteristics i.e. DM1601, ACM1601.
Vss - Supply GRD.
Vdd - Supply 5V
Vo - Contrast Adjust
RS - Register Select
R/W - Data Read/Write
E - Enable
D4-D7 - Data Bus Lines



Comments and questions

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

Be the first to add a comment.

moty22.co.uk  2008-2021