MAIN SITE HOME
Technical Tips

LCD TFT EGG TIMER + THERMOMETER (OPTIONAL)

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.
OPTINAL DS18B20 TERMOMETER
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.