DOCUMENTATION DISPLAYS BuyDisplay 2.8" CTP - ESP8266
Overview
Getting Started
BASE
Reference
Worker
Setup modules
COMMODETTO
Reference
Poco Renderer
Outlines
Creating Fonts
Crypt
Data
DEVICES
Moddable One
Moddable Two
Moddable Three
Moddable Four
Moddable Display
ESP32
ESP8266
nRF52
nRF52 Low Power Notes
Raspberry Pi Pico
M5Core Ink
M5Paper
Wasm
SiLabs Gecko
QCA4020
Moddable Zero
DISPLAYS
Overview
Adafruit 1.8" ST7735
Adafruit OLED Display
BuyDisplay 2.8" CTP - ESP8266
Crystalfontz ePaper
DotStar
Generic 1.44"
Generic 2.4" & 2.8" (Resistive Touch) - ESP32
Generic 2.4" & 2.8" (Resistive Touch) - ESP8266
Generic 2.4" & 2.8" (Resistive Touch) - Pico
Sharp Memory
Sharp Memory Screen 1.3"
SparkFun TeensyView
Switch Science Reflective LCD
DRIVERS
DESTM32S display
DotStar display
ILI9341 display
LPM013M126A display
LS013B4DN04 display
MCP230XX GPIO expander
NeoStrand
SSD1306 display
SSD1351 display
ST7735 display
Files
IO
TC53 IO
Firmata
NETWORK
Reference
TLS (SecureSocket)
BLE
Ethernet
Web Things
PINS
Reference
Audio Output
PIU
Reference
Localization
Keyboard
Expanding Keyboard
Die Cut
Using After Effects Motion Data
TOOLS
Reference
Manifest
Defines in Manifests
Testing
XS
Handle
JavaScript language considerations on embedded devices using the XS engine
Mods – User Installed Extensions
ROM Colors
Using XS Preload to Optimize Applications
XS Conformance
XS Marshalling
XS Platforms
XS in C
XS linker warnings
xsbug
xst
XS Compartment
XS Profiler

BuyDisplay 2.8" CTP Display Wiring Guide - ESP8266

Copyright 2018 Moddable Tech, Inc.
Revised: December 6, 2018

Generic SPI Display

Specs

Part ER-TFTM028-4 LCD w/Capacitive Touch Screen Module (datasheet)
Size 2.8", 320 x 240
Type TFT LCD
Interface SPI
Drivers video ILI9341, touch FT6206
Availability 2.8" BuyDisplay CTP display
Description This BuyDisplay screen is highly configurable and can be ordered with varying touch modules, main power voltage and connection types. This sample is for the 3.3v CTP version.

Configuration

This display supports many configurations. For this sample, Moddable configured the display IMO settings to support 4 wire SPI. See the ER-TFTM028-4 datasheet. The jumper settings below are open or closed drag solder pads on the PCB.

IMO Mode Jumper settings
4-wire SPI Interface J2, J3, J4, J5 Short
J1, J6, J7, J8 Open
R1-R10=0R
R19=0R
R21-R28=0R
R17, R18, R20 not soldered

Display input voltage The TFTM028-4 can be configured to be powered by either 5v or 3.3v via a solder jumper. See Table 4.3 in the datasheet. For this guide the display was set to run with 3.3v input. If the display was configured for 5v Pin 2 on the display header would require 5v input.

Moddable Sample code

The drag example is good for testing this display. To run a debug build, use the following build command:

cd $MODDABLE/examples/piu/drag
mcconfig -d -m -p esp/buydisplay_ctp

ESP8266 Pinout

BuyDisplay CTP Display ESP8266 ESP8266 Devboard label
1 - VSS GND
2 - VDD 3.3V
21 - Reset 3.3V
23 - CS GPIO 15 (D8)
24 - SCK GPIO 14 (D5)
25 - DC GPIO 2 (D4)
27 - SDI GPIO 13 (D7)
28 - SDO GPIO 12 (D6)
30 - CPT SCL GPIO 4 (D2)
31 - CPT SDA GPIO 5 (D1)

Generic 2.4"-2.8" wiring illustration