Skip to main content

NM-Display-2.8

Overview

The NM-Display-2.8 is a low-cost IoT display development board based on the ESP32-S3, featuring a 2.8" TFT touchscreen, 6-axis IMU, RTC, audio codec, and power management IC. It is suitable for smart home control panels, IoT Human-Machine Interface (HMI), and edge AI Agent display terminals.

NM-Display-2.8

Hardware Specifications

Core Configuration

ItemSpecification
MCUESP32-S3 Dual-core Xtensa LX7, 240 MHz
SRAM512 KB + 8 MB PSRAM
Flash16 MB SPI Flash
WirelessWi-Fi 4 (802.11 b/g/n) + Bluetooth 5.0 LE
Display2.8" ST7789, 320 × 240 pixels
TouchFT6336 capacitive touch (I2C)
Resolution320 × RGB × 240
InterfaceUSB Type-C (power / programming)

Onboard Resources

DeviceModelBus
IMUQMI8658 (6-axis accelerometer / gyroscope)I2C
RTCPCF85063 (real-time clock)I2C
Audio CodecES8311 (I2S)I2C control + I2S data
PMUAXP2101I2C
IO ExpanderTCA9554I2C
CameraOV series DVP interface (optional)DVP
SD CardSDMMC 1-bit modeSDMMC
BacklightLEDC PWM dimmingGPIO

Pinout

NM-Display-2.8 Pinout

Power & Debug

GPIOFunctionDescription
GNDGroundGround
3V33.3V OutputExternal 3.3V output (max 500 mA)
TXDUART TX (GPIO43)Serial TX / general GPIO
RXDUART RX (GPIO44)Serial RX / general GPIO

I2C Bus (Shared)

GPIOFunctionDescription
IO7I2C SCLCommon I2C clock (not available as regular GPIO)
IO8I2C SDACommon I2C data (not available as regular GPIO)
warning

All of the following peripherals share a single I2C bus (I2C_NUM_0): TCA9554, FT6336, AXP2101, ES8311 (control), QMI8658, PCF85063.

Display (ST7789)

GPIOFunction
IO1SPI MOSI
IO5SPI SCLK
IO3LCD DC
IO6Backlight BL (PWM)
NCSPI CS
NCLCD RESET
  • Interface: SPI, clock 80 MHz, SPI Mode 3
  • Driver: ST7789
  • Resolution: 320×240 (logical width×height at 270° rotation)

Touch Screen (FT6336, I2C)

GPIOFunctionDescription
IO7I2C SCLTouch controller clock
IO8I2C SDATouch controller data
NCTP INTTouch interrupt (not connected)
NCTP RESETTouch reset (not connected)

Audio Codec (ES8311)

GPIOFunctionDescription
IO7I2C SCLES8311 control bus
IO8I2C SDAES8311 control data
IO12I2S MCLKI2S master clock
IO13I2S BCLKI2S bit clock
IO15I2S LRCKI2S left / right clock
IO14I2S DINRecording data input
IO16I2S DOUTPlayback data output

Camera (DVP Interface)

GPIOFunctionDescription
IO38XCLKCamera clock output
IO17VSYNCVertical sync signal
IO18HREFHorizontal reference signal
IO41PCLKPixel clock
IO45D0 (Y2)Data bit 0
IO47D1 (Y3)Data bit 1
IO48D2 (Y4)Data bit 2
IO46D3 (Y5)Data bit 3
IO42D4 (Y6)Data bit 4
IO40D5 (Y7)Data bit 5
IO39D6 (Y8)Data bit 6
IO21D7 (Y9)Data bit 7
IO8SCCB SDA(shared I2C bus)
IO7SCCB SCL(shared I2C bus)
  • XCLK frequency: 20 MHz
  • Frame format: RGB565, 320×480

SD Card (SDMMC 1-bit)

GPIOFunctionDescription
IO9SDMMC D0Data bit 0
IO10SDMMC CMDCommand line
IO11SDMMC CLKClock line
  • Mount point: /sdcard
  • Mode: 1-bit SDMMC

Button

GPIOFunctionDescription
IO0BOOT ButtonBoot button (active low)

Others

GPIOFunctionDescription
IO1Debug TXDebug serial TX
IO2Debug RXDebug serial RX
IO3Touch INT / GPIOTouch interrupt or general GPIO
IO4Battery ADCBattery voltage detection (optional)

Quick Start

1. Hardware Preparation

ItemQuantity
NM-Display-2.8 board×1
USB-C cable×1
(Optional) Battery (3.7V LiPo)×1

2. Development Environment Setup

Recommended: ESP-IDF v5.3+.

# 1. Install ESP-IDF (Linux/macOS)
bash -c "$(curl -fsSL https://espressif.github.io/esp-idf/install.sh)"

# 2. Activate environment
source ~/esp-idf/export.sh

# 3. Clone example code
git clone https://github.com/RockBase-iot/NM-Display-28inch.git
cd NM-Display-28inch

# 4. Configure project
idf.py set-target esp32s3
idf.py menuconfig

# 5. Build and flash
idf.py build
idf.py flash monitor

3. First Flash

# Flash using esptool
esptool.py --chip esp32s3 --port /dev/ttyUSB0 write_flash 0x1000 bootloader.bin 0x8000 partition-table.bin 0x10000 app.bin

4. Serial Monitor

idf.py monitor
# Baud rate: 115200

Onboard Peripheral Drivers

IMU Driver (QMI8658)

#include "qmi8658.h"

i2c_dev_t qmi8658;
esp_err_t ret = qmi8658_init(&qmi8658, I2C_NUM_0);

qmi8658_val mag;
ret = qmi8658_read_mag(&qmi8658, &mag);
// mag.x, mag.y, mag.z

RTC Driver (PCF85063)

#include "pcf85063.h"

pcf85063_set_time(&i2c_dev, 2026, 5, 19, 16, 56, 0);
pcf85063_get_time(&i2c_dev, &datetime);

Audio Playback (ES8311)

#include "es8311.h"

es8311_init(I2C_NUM_0);
es8311_set_volume(80); // 0-100

// Play PCM data stream
es8311_play(audio_buffer, length);

Touch Screen (FT6336)

#include "ft6336.h"

ft6336_init(I2C_NUM_0);
touch_point_t point;
if (ft6336_read_touch(&point)) {
printf("Touch: x=%d, y=%d\n", point.x, point.y);
}

FAQ

Q1: What if the touch screen has no response?

A1: Check if IO7/IO8 are occupied by other devices. I2C address conflicts can cause touch failure. Use the i2cdetect tool to scan the I2C bus and verify the touch chip address is 0x38 or 0x48.

Q2: How to troubleshoot backlight issues?

A2: Backlight is controlled by IO21 (LEDC PWM). Verify GPIO21 is correctly configured. Measure the backlight voltage on the LCD board to confirm the circuit is functioning.

Q3: SD card fails to mount?

A3: Ensure SDMMC pins (IO9/IO10/IO11) are not occupied by other functions. Check if the SD card is formatted as FAT32, maximum supported capacity is 32GB.

Q4: How to enter download mode?

A4: Hold the BOOT button, press and release the RST button, then release the BOOT button. The device will enter UART download mode.

Q5: What if the device fails to boot after a sudden power loss?

A5: It may be caused by the PMU protection being triggered due to low input voltage from the USB port. Try replacing with a high-quality power supply or using battery power. In addition, for applications using peripherals such as the camera, make sure to check that the PMU AXP2101 is configured correctly to ensure the power management IC can provide sufficient current. Refer to the NM-Display-2.8 Factory Test Code for details.

Reference Resources

ResourceLink
Example CodeRockBase-iot/NM-Display-28inch
ESP-IDF Docshttps://docs.espressif.com/projects/esp-idf/
ESP32-S3 DatasheetEspressif ESP32-S3 Datasheet