KL-TFT028B-PCB is 240x320 dots 2.8" color tft lcd module display with ILI9341 controller and 4-wire resistive touch panel,superior display quality,super wide viewing angle and easily controlled by MCU such as 8051, PIC, AVR, ARDUINO, and ARM .
It can be used in any embedded systems,industrial device,security and hand-held equipment which requires display in high quality and colorful image.It supports 8080 8-bit,9-bit,16-bit,18-bit parallel,3-wire,4-wire serial spi interface. FPC with zif connector is easily to assemble or remove.
----
Features
1.Brand New Screen with the production date on the back
2.IL19341 driver chip is suitable for mutiple circuit design requirments
3.320X240 resolution, 16-bit color (65,000 colors)
4.Highly sensitive resistive touch screen
5.LED backlight with low power consumption and high brightness
6.Multiple modes are switched by resistance
7.Screen development manual is available to help with circuit development
There is a silk screen on the back of the PCB panel to prompt how to solder 0 ohm resistors to switch between different modes.
\* In different modes, the welding method is different. For example, if I need to use the 8Bit SPI method, I can move the position of the 0 ohm resistor as shown in the figure below.
How to drive display on Raspberry Pi Pico
1. Re-solder the 0 ohm resistor on the PCB board according to the following table.
IM Section
1
0
IM3
0
1
IM2
1
0
IM1
1
0
IM0
0
1
Note: Please solder R17 to enable Backlight(BL_EN)
\* 2. Connect Screen to Raspberry Pi Pico as following table.
"""
Exercise on Raspberry Pi Pico/MicroPython
with 320x240 ILI9341 SPI Display
"""
from ili934xnew import ILI9341, color565
from machine import Pin, SPI
from micropython import const
import os
import glcdfont
import tt14
import tt24
import tt32
import time
SCR_WIDTH = const(320)
SCR_HEIGHT = const(240)
SCR_ROT = const(2)
CENTER_Y = int(SCR_WIDTH/2)
CENTER_X = int(SCR_HEIGHT/2)
print(os.uname())
TFT_CLK_PIN = const(6)
TFT_MOSI_PIN = const(7)
TFT_MISO_PIN = const(4)
TFT_CS_PIN = const(13)
TFT_RST_PIN = const(14)
TFT_DC_PIN = const(15)
fonts = [glcdfont,tt14,tt24,tt32]
text = 'Hello Raspberry Pi Pico/ili9341'
print(text)
print("fonts available:")
for f in fonts:
print(f.)
spi = SPI(
0,
baudrate=40000000,
miso=Pin(TFT_MISO_PIN),
mosi=Pin(TFT_MOSI_PIN),
sck=Pin(TFT_CLK_PIN))
print(spi)
display = ILI9341(
spi,
cs=Pin(TFT_CS_PIN),
dc=Pin(TFT_DC_PIN),
rst=Pin(TFT_RST_PIN),
w=SCR_WIDTH,
h=SCR_HEIGHT,
r=SCR_ROT)
display.erase()
display.set_pos(0,0)
for ff in fonts:
display.set_font(ff)
display.print(text)
display.set_font(tt24)
display.set_color(color565(255, 255, 0), color565(150, 150, 150))
display.print("\nThanks:")
display.print("https://github.com/jeffmer/micropython-ili9341")
time.sleep(1)
for i in range(170):
display.scroll(1)
time.sleep(0.01)
time.sleep(1)
for i in range(170):
display.scroll(-1)
time.sleep(0.01)
time.sleep(1)
for h in range(SCR_WIDTH):
if h > SCR_HEIGHT:
w = SCR_HEIGHT
else:
w = h
display.fill_rectangle(0, 0, w, h, color565(0, 0, 255))
time.sleep(0.01)
time.sleep(0.5)
display.erase()
# Helper function to draw a circle from a given position with a given radius
# This is an implementation of the midpoint circle algorithm,
# see https://en.wikipedia.org/wiki/Midpoint_circle_algorithm#C_example
# for details
def draw_circle(xpos0, ypos0, rad, col=color565(255, 255, 255)):
x = rad - 1
y = 0
dx = 1
dy = 1
err = dx - (rad << 1)
while x >= y:
display.pixel(xpos0 + x, ypos0 + y, col)
display.pixel(xpos0 + y, ypos0 + x, col)
display.pixel(xpos0 - y, ypos0 + x, col)
display.pixel(xpos0 - x, ypos0 + y, col)
display.pixel(xpos0 - x, ypos0 - y, col)
display.pixel(xpos0 - y, ypos0 - x, col)
display.pixel(xpos0 + y, ypos0 - x, col)
display.pixel(xpos0 + x, ypos0 - y, col)
if err <= 0:
y += 1
err += dy
dy += 2
if err > 0:
x -= 1
dx += 2
err += dx - (rad << 1)
draw_circle(CENTER_X, CENTER_Y, 120)
display.set_pos(1,10)
display.print("helloraspberrypi.blogspot.com")
for c in range(99):
draw_circle(CENTER_X, CENTER_Y, c, color565(255, 0, 0))
for c in range(98):
draw_circle(CENTER_X, CENTER_Y, c, color565(0, 255, 0))
for c in range(97):
draw_circle(CENTER_X, CENTER_Y, c, color565(0, 0, 255))
print("- bye-")
Running Status:
Package Includes
1 x TFT28 Display with Touch screen
1 x PCB Driver Board
3 x 17 Pin header
Keywords
TFT2.8 inch touch screen, touch screen, TFT 2.8 inch, Raspberry Pi Pico, ILI9341, TFT2.8 inch display