Interfacing PIC18F4550 with 1.8″ TFT display




This post shows how to connect ST7735S TFT display to PIC18F4550 microcontroller and display different things (numbers, text, lines, circles …..). The compiler used is CCS PIC C.
To interface PIC18F4550 with the ST7735 TFT display we need a small library (driver) which can be downloaded from its original post at the following url:
ST7735 SPI TFT Display Driver for CCS PIC C compiler
Or you can just download it directly from the following link:
ST7735 SPI TFT Display Driver
Put the downloaded C file in your project folder.
Required Components:

  • PIC18F4550 Microcontroller
  • ST7735R (or S) 1.8″ SPI TFT Display
  • 5 x 1K Resistors (If the system is 3.3V there is no need for these resistors)
  • Power Supply Source (+5V or +3.3V)
  • Breadboard
  • Jumper Wires

Interfacing PIC18F4550 with ST7735S 1.8″ SPI TFT display circuit:Circuit Interfacing PIC18F4550 with 1.8 TFT display

PIC18F4550 internal oscillator is used in this project and MCLR pin function is disabled.
The system power supply is 5V and if you are using a microcontroller TFT display of 3.3V remove all the 1K resistors (5 resistors) from the circuit and connect the TFT display directly to the microcontroller.
Interfacing PIC18F4550 with ST7735S 1.8″ SPI TFT display CCS C code:
PIC18F4550 SPI module is used for to communicate with the TFT display. SPI module uses the following pins:
SDI (RB0): data input pin (not used in this project)
SCK (RB1): clock line
SDO (RC7): data output
// TFT module connections
#define TFT_CS  PIN_B2
#define TFT_DC  PIN_B3
#define TFT_SPI_HARDWARE
// End TFT module connections

My TFT display is ST7735R Black Tap (ST7735S) and for initializing this type of TFT display I used the following line:Interfacing PIC18F4550 with 1.8 TFT display
TFT_BlackTab_Initialize();
If you have a TFT display with green or red tabs or a TFT with ST7735B controller read the driver topic above.
Note that green, red and black tabs have the same controller ST7735R.
The microcontroller runs with its internal oscillator at 8MHz.
This code is tested with CCS PIC C compiler PCWHD versions 4 and 5.

READ  Twitter Watcher, the #twatch using PIC18F67J60 microcontroller

 

For more detail: Interfacing PIC18F4550 with 1.8″ TFT display




Current Project / Post can also be found using:

  • pic elsidi proje
  • tft lcd interface with pic microcontroller

Leave a Comment

*
= 4 + 6

Read previous post:
LT8362 LOW IQ BOOST OR SEPIC OR INVERTING CONVERTER WITH 2A 60V SWITCH
LT8362 – LOW IQ BOOST/SEPIC/INVERTING CONVERTER WITH 2A, 60V SWITCH

Features Wide Input Voltage Range: 2.8V to 60V Ultralow Quiescent Current and Low Ripple Burst Mode® Operation: IQ = 9µA 2A, 60V Power...

Close
Scroll to top