-------------------------
📌Introduction
-------------------------
This topic shows how to build a real time clock with temperature monitor using PIC16F877A microcontroller, DS3232 RTC chip and ST7735R (ST7735S) 128×160 color TFT display. CCS C compiler is used in this example. Also a small video shows Proteus simulation of this project.
To build this project we need a driver for the ST7735 TFT screen.
-------------------------
📌 Circuit
-------------------------
In the circuit there are 2 push buttons (B1 & B2) connected to PIC16F877A pins RB2 and RB3 respectively, the two push buttons are used to set time and date parameters (minutes, hours, day of the week, date, month and year). Button B1 selects the parameter and B2 increments the selected parameter.
In this project PORTB pull-ups are enabled (in the software) which means there is no need for external pull up resistors for pins RB2 and RB3. The microcontroller runs with 20MHz crystal oscillator (5 MIPS).
-------------------------
📌 C Code
-------------------------
ST7735 TFT driver for CCS C compiler is required and without it we can not compile the code. Since the PIC16F877A has one MSSP module (Master Synchronous Serial Port module) which can operate in SPI mode or I2C mode, I used software I2C to communicate between the master device (the microcontroller) and the slave device (DS3231). Software I2C is initialized using the function below:
#use I2C(master, SCL = PIN_B0, SDA = PIN_B1)
So, I used the MSSP in SPI mode for faster data transfer between the microcontroller and the ST7735 TFT display. Software SPI can be used but its very slow compared to hardware SPI.
-------------------------
📌 Tags
-------------------------
#pic16f877a #st7735 #TFT_Display
-------------------------
📌 The Code
-------------------------
Given In Comment Section
📌 Tune With us so you never miss any update
-------------------------------------------------------------------------------------------------------------------------------------------------------------
🏷️Telegram : https://t.me/electronicsdeveloper
🏷️Facebook : / electronicsdeveloper
🏷️Instagram : / electronics_developer
🏷️Tweeter : https://twitter.com/Electronics_Dev?s=09
🏷️LinkedIn : / electronics-with-shreyash
🏷️Pinterest : / electronics_developer
Copyright Disclaimer under Section 107 of the copyright act 1976
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Copyright Disclaimer under Section 107 of the copyright act 1976, allowance is made for fair use for purposes such as criticism, comment, news reporting, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
About Electronics Developer : YouTube certified creative essentials and asset monetization
---------------------------------------------------------------------------------------------------------------------------------------------------------------