OLED Current Meter PIC12F675
Picture Frame PIC16F690
Talking Clock PIC16F628A
OLED Thermometer PIC12F629
OLED Thermostat PIC16F628A
TFT Counter PIC16F628A
SSD1306 Counter PIC16F628A
SSD1331 Counter PIC16F628A
Color OLED Picture Frame
Arduino Counter for PC
Arduino Oled Code Lock
PC digital I/O without MCU
PC Analog Input without MCU
Arduino Oscilloscope for PC
Arduino OLED Oscilloscope
Arduino Picture Frame
OLED Bitmap Arduino / PIC
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
3.7V to 5V
Solar Charger
Infrared Decoder
PIC Music
Code Lock
Code Lock with LCD
HOME fr  ru  de  in  ro  ar  tr  nl  il  Technical Tips

TFT FREQUENCY COUNTER PIC16F628A, PIC16F876A, PIC16F690

LCD TFT is digital display at its best, it displays versatile clear picture. The picture is built by entering the address and the color of a pixel or rectangle, so it's simple to use too.
Counter using PIC16F628A drives the TFT with software SPI (slower SPI). Counter using PIC16F876A or PIC16F690 the TFT is driven by hardware SPI.
Included C code and circuit diagram. The LCD TFT module is a 1.8" 128 X160 pixel and has the driver ST7735
The frequency is displayed by 7 digits with leading zeros removed down to 1 digit. The picture displayed is based on 7 segment for the PIC16F876A and universal text for the PIC16F690 and PIC16F628A. The period is calculated. When input frequency is less than 1000Hz the period is displayed in us.
The counting is over a period of 1 second, generated by the 8/16 MHz crystal oscillator. The max counting is 7 digits (10MHz). I tested the counter at up to 2MHz. Period of 1 sec is generated by TMR1 and CCP1.
Code is for MPLAB, MPLABX and compilers HI TECH or XC8 (ver1.45).

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

OLED FREQUENCY COUNTER FOR ARDUINO

Counter using Arduino Uno or Nano. Included ino file and circuit diagram. The OLED module is a 0.96" 128 X 64 pixel driven by I2C interface and using SSD1306 driver IC. The OLED display uses low power LEDs and suitable for battery operated frequency counter. Power can be reduced farther by reducing contrast.
The frequency is displayed with leading zeros removed down to 1 digit. The font used is 5x7 pixels universal font. The period is calculated. When input frequency is less than 1000Hz the period is displayed in us.
The counting is over a period of 1 second, divided from the 16 MHz crystal oscillator. The max counting is 6MHz (Atmel specs). I tested the counter at up to 2MHz. Period of 1 sec is generated by the 3 internal timers.
Code is mostly in C and includes setting up the timers and counter, font 5x7 and oled initializing (no library for oled needed). 

OLED FREQUENCY COUNTER FOR PIC16F628A, PIC16F876A

Counter using PIC16F876A or PIC16F628A. Included C code and circuit diagram. The OLED module is a 0.96" 128 X 64 pixel driven by I2C interface and using SSD1306 driver IC. The OLED display uses low power LEDs and suitable for battery operated frequency counter. Power can be reduced farther by reducing contrast.
PIC16F876A drives the oled using hardware I2C, PIC16F628A uses software (bit banging) I2C.
The frequency is displayed with leading zeros removed down to 1 digit. The font used is 8x8 pixels universal font. The period is calculated. When input frequency is less than 1000Hz the period is displayed in us.
The counting is over a period of 1 second, divided from the 8 MHz crystal oscillator. The max counting is 7 digits (10MHz). I tested the counter at up to 2MHz. Period of 1 sec is generated by TMR1 and CCP1.
Code is in MPLAB X and compilers  XC8 (ver1.45).

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

      628 counter

Circuit Description
See also Technical Tips

Supply is 5V +/-10%.
Frequency input signal is TTL levels, 5V max.
The TFT module has the driver ic ST7735, The inputs of the ic tolerate 5V, one source is: https://www.ebay.co.uk/itm/1-8-inch-1-8-TFT-LCD-Display-module-ST7735S-128x160-51-AVR-STM32-ARM-8-16-bit/191786659555?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649

OLED module can be bought from ebay: https://www.ebay.co.uk/itm/0-96-I2C-IIC-Serial-128X64-White-OLED-LCD-LED-Display-Module-for-Arduino-UK/192294699203?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649



      


Name:

Comments and questions

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



27.03.2016 - 15:45
Name: Hasan
Comment: Thenks

moty22.co.uk  2008-2021