HOME Technical Tips  

TFT CLOCK + THERMOMETER

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.
Clock based on PIC16F876A 1.8" LCD TFT Module. Included C code, makefile for MPLAB X, hex file and circuit diagram. Fonts are 5 bytes long each they are stored in the flash memory of the PIC.
Seconds timebase for the clock is a division of the 16MHz crystal using CCP1, CCP2, TMR1 and TMR2. A link of pins 11 and 12 connects the output of CCP2 to TMR1 input.
2xDS18B20 digital sensors are for measuring temperatures inside and outside the house. The temperature range is -55 to 99.9 centigrade. The sensor doesn't require calibration. The software updates the reading every 30 seconds.
LCD TFT module
has the driver ST7735 size is 1.8" 160x128 pixels. https://www.ebay.co.uk/itm/1-8-inch-1-8-TFT-LCD-Display-module-ST7735S . Inputs of the driver tolerate 5V, the board has 3.3V regulator for the driver.

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

tft-clock.gif

Circuit Description
See also Technical Tips

DS18B20 is a digital temperature sensor, any case type can be used.
The crystal is 16 MHz, refer to the data sheet for the recommended capacitors. Most crystals use 22pF.
Link between pins 11 and 12 connects 5 KHz generated by CCP2 driving TMR1 and CCP1 to give timebase of 1 sec.
The TFT module in the project has the driver ic ST7735 . LED input is connected directly to the led's, the 47 ohm resistor is selected to give max brightness, the resistance can be increased to reduce the light.
HOUR and MINUTE pushbuttons can be any type of NO switch.



Name:

Comments and questions

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


Be the first to add a comment.

iconFlag Countermoty22.co.uk  2008-2022