MOBILE HOME Technical Tips  

LCD TFT FREQUENCY COUNTER

Updated on 23.7.2015.
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 PIC16F876A or PIC16F690. Included C code and circuit diagram. The LCD TFT module is a 1.8" 128 X160 pixel. The LCD is driven by SPI.
The frequency is displayed by 7 digits with leading zeros removed down to 1 digit. The picture displayed is based on 7 segment. 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 8MHz crystal oscillator.
The max counting is over 16MHz but the 7 digit display limits the readings to 10MHz. I tested the counter at up to 2MHz. Period of 1 sec is generated by TMR1 and CCP1.
For the PIC16F876A circuit 74HC4050 hex buffer can be replaced by 4050B cmos.

LCD TFT modules vary depending on the drive IC. The module in the project has the driver ST7735 or S6D02A1A01. I bought this module directly from China because the price was more sensible.
Code is for MPLAB, MPLABX and compilers HI TECH or XC8

Circuit Description
See also Technical Tips

Input signal is 3.3V max.
Supply is 5V +/-10%.
3.3V to the PIC16F690 is connected to the 3.3V regulator on the TFT module or external regulated 3.3V.
47R is powering the TFT LED.
The module in the project has the driver ic S6D02A1A01. If you use module with driver ic ST7735 you will need to comment the inversion command in the code to stop it inverting colors.

Circuit Description
See also Technical Tips

The crystal is a 8MHz.
Supply is 5V +/-10%. Input signal is TTL levels.
3.3V to the 74HC4050 can be connected to the 3.3V regulator on the TFT module.
74HC4050 hex buffer is level shift to drop the 5V from the pic outputs to 3.3V input to the TFT Module. You can use cmos 4050B. If you use another buffer make sure it has 5V tolerant inputs.
Input is 5V max. TTL type.
The module in the project has the driver ic S6D02A1A01. If you use module with driver ic ST7735 you will need to comment the inversion command in the code to stop it inverting colors.





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