EP-0065

From 52Pi Wiki
Jump to navigation Jump to search

TFT28 Display + Touch Panel + PCB

Description

Tft28.jpg


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

Gallery

Tft28b1.jpg
Tft28b2.jpg
Tft28b3.jpg

Tft28b4.jpg
Tft28b5.jpg
Tft28b6.jpg

Specifications

Parameters Values
Gross Weight (kg) 0.0200kg
Manufacturer Cool-Lite
Series Number KL-TFT028B
Part Number(Order Number) KL-TFT028B
Connection FPC-Connector
Display Format 240x320 Dots 262K
Sunlight Readable No
Touch Panel Optional Yes
Outline Dimension 50.2(W)x69.3(H)x4.0(T)mm
Visual Area 44.80x59.20mm
Active Area 43.20(W)x57.60(H)mm
Character Size User Define
Diagonal Size 2.8“
Dot (Pixel) Size 0.18x0.18mm
Dot Pitch No
IC Package COG
IC or Equivalent ILI9341V
Interface 8080 8-bit Parallel , 8080 9-bit Parallel , 8080 16-bit Parallel , 8080 18-bit Parallel , 3-Wire SPI , 4-Wire SPI , 16-Bit RGB ,18-Bit RGB
Display Type TFT-LCD Color
Response Time(Typ) Less than 5ms with Parallel / Less than 200ms with SPI
Contrast Ratio(Typ) 500:1
Colors 65K/262K
Viewing Direction 12:00
Viewing Angle Range Left:70.0 , Right:70.0 , Up:70.0 , Down:60.0 degree
Appearance RGB on Black
Brightness(Typ) 240cd/m2
Backlight Color White Color
Backlight Current (Typ) No
Power Supply(Typ/Absolute) 2.8V/3.3V
Supply Current for LCM(Max) 24 mA
Operating Temperature -20℃~70℃
Storage Temperature -30℃~80℃

Silk Mark Definitions

Silkmark Meanning
L_RD_EN LCD Read Enable, L - means LCD display
T_SPI Touch Screen SPI, T - Means Touch Screen
F_SPI Flash SPI, F - Means Flash
L_SPI LCD SPI, L - means LCD display
BL_EN Backlight Enable, BL - means Backlight
IN_5v/IN_3V3 3V3 @ 1A (≈) 5V @ 700mA (≈)
NOTE: Resistors R7 and R8 are used to select the power supply voltage. This board supports two different power supply voltages,3.3V@1A, 5V@700mA.

MCU Interface Selections

Mcuinterfaceselection.png


Documentation

Please read following datasheet carefully when you are getting start to develop.


How to change mode

  • 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.
Pcb mode.jpg


  • 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.
Change mode.jpg


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) 
Soldering pico tft28 display.png


  • 2. Connect Screen to Raspberry Pi Pico as following table.
TFT28 Display Raspberry Pi Pico
GND GND
VCC 3V3
L_RST GP14
L_DC GP15
L_CS GP13
MISO GP4
MOSI GP7
SCLK GP6
  • 3. Install library:

Visit https://github.com/jeffmer/micropython-ili9341, copy and save ili934xnew.py, glcdfont.py, tt14.py, tt24.py and tt32.py to Raspberry Pi Pico.

"""
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.__name__)

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:
Pico tft28 display.png


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