PIC Projects
TFT Clock and Thermometer
WiFi, Ethernet
Doorbell with SD / EEPROM
SD FAT16/32 for .bmp
LCD 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
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

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

Infrared Decoder
PIC Music

Code Lock
Code Lock with LCD
HOME MOBILE Technical Tips


Updated on 1.1.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.
Timer based on PIC16F876A 1.8" LCD TFT Module. Included C code, and circuit diagram. Time span is 1 second to 99 minutes. Setting the time is by Min and the Sec pushbuttons. To reset the time press Sec and Min simultaneously. Pressing start/stop starts the countdown. When the time reaches zero the buzzer sounds for 20 seconds. After the alarm the displayed time sets to the recent time setting.
15625 Hz is generated by CCP2 driving TMR1 and CCP1 to give period of 1 sec.
74HC4050 hex buffer can be replaced by 4050B cmos.
An option to add DS18B20 digital sensor to the circuit and have temperature reading of -55 to 99.99 centigrade. The sensor doesn't require calibration. The software updates the reading every 10 seconds.
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.
You are free to use the circuit diagram and the software with no limitations.

Circuit Description
See also Technical Tips

DS18B20 is a digital temperature sensor, it's an optional component.
The buzzer is driven by a frequency of 2KHz, a piezo buzzer for that frequency will give optimal output.
The crystal is 8 MHz, refer to the data sheet for the recommended capacitors. Most crystals use 22pF.
Link between pins 11 and 12 connects 15625 Hz generated by CCP2 driving TMR1 and CCP1 to give timebase of 1 sec.
The 5V output can be used to drive a relay or LED.
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.
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.
Pushbuttons can be any type. Pressing the Sec and Min together resets the time.


Comments and questions

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

01.05.2016 - 09:47
Name: Peter
Comment: Could you please modify the program so that the set time stored in the internal memory and is retained even after disconnection from the power supply? Thank you.