SD Card and ST7735R TFT Proteus simulation with PIC microcontroller

Опубликовано: 08 Февраль 2025
на канале: Electronics Developer
900
like

-------------------------
📌Introduction
-------------------------
This small post shows a simulation example of SD card, ST7735R TFT (128×160) and PIC18F4550 microcontroller. The software used in this example is the well known simulation software ‘Proteus’.
In this example I’m going to store some image files (BMP format) on the SD card and display it on the ST7735R TFT screen.

-------------------------
📌Circuit Design
-------------------------
The ST7735 SPI TFT library allows the interfacing of this display with any PIC microcontroller more simpler and easier. This library is based on the Adafruit TFT library for Arduino. This library works with any PIC microcontroller with or without SPI module (hardware SPI is faster than software SPI).
Basically the TFT display has 5 control lines: RST (Reset, active low), CS (Chip Select, active low), DC (Data/Command), SDA (Data Line) and SCL (Clock Line).

-------------------------
📌 Tags
-------------------------
#fighter_jet #st7735 #pic16f877a

-------------------------
📌 The Code
-------------------------
Generally there are 4 types of the ST7735 TFT display. One has ST7735B controller and the other 3 types are:
1. ST7735R Green Tab
2. ST7735R Red Tab
3. ST7735R Black Tab (ST7735S)
As for a simple LCD display the TFT display has an initialization sequence which can be made using the following functions according to the TFT display type:
1. TFT_ST7735B_Initialize(); // For ST7735B
2. TFT_GreenTab_Initialize(); // For ST7735R green tab
3. TFT_RedTab_Initialize(); // For ST7735R red tab
4. TFT_BlackTab_Initialize(); // For ST7735R black tab (ST7735S)

As in the previous project, we need 3 files which are:
1. The ST7735 TFT display driver
2. MMC/SD Card driver for CCS PIC C compiler
3. FAT16 Library for CCS C compiler.Source Code give in comment section.

The ST7735 SPI TFT library can work with hardware SPI or software. The hardware SPI is much faster than the software SPI. If you want to use your microcontroller hardware SPI module the following variables must be defined:
1. #define TFT_CS
2. #define TFT_DC
3. #define TFT_SPI_HARDWARE
And if you want to use software SPI define the following parameters:
4. #define TFT_CS
5. #define TFT_DC
6. #define TFT_CLK
7. #define TFT_DATA

📌 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
---------------------------------------------------------------------------------------------------------------------------------------------------------------