MF PROJECTS HOME TECHNICAL TIPS MOBILE SITE
PIC Projects
WiFi, Ethernet
Doorbell with SD / EEPROM
SD FAT16/32 for .bmp
TFT Egg Timer
LCD TFT Oscilloscope
SD Talking Clock
SD Sound Recorder,
    FAT32 wav Player
LED Thermometer
LED Egg Timer
LCD Egg Timer

Frequency Counters
TFT 10MHz
100KHz For PC
1MHz For PC
8 Digits LED 50 MHz
Scope Screen Display
LCD Module 10MHz
6MHz for Android
USB PIC18F2550
USB TFT display BMP
USB DS18B20 Sensor
USB Thermometer
USB Counter
USB Meter
USB Oscilloscope
USB Input-Output
USB 16x2 LCD

COM & LPT Ports
MCP3201 on LPT
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to LPT
MCP3201 on Serial Port
Serial Thermometer
Analogue Signal to Serial
LCD Display on LPT
Serial Thermostat

Others
Water Softener
HP Stream 7 docking
3.7V to 5V
Solar Charger

Infrared Decoder
PIC Music

Code Lock
Code Lock with LCD

LCD FREQUENCY COUNTER
see also TFT Counter , LED Counter

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).

ARDUINO LCD FREQUENCY COUNTER
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

Supply for the LCD is 5V sourced by the Arduino.
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

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





Name:

Comments and questions

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


Be the first to add a comment.