Screen

Module Specification

Screen

1.8" color display with 160x80 resolution

Description

Vibrant color display for showing text, graphics, sensor readings, animations, game visuals, and user interfaces. 160x80 resolution with 65K colors.

For ages 14 and up. Not a toy. Contains small parts: choking hazard. Keep away from children under 3. Adult supervision recommended.

Made by Atech ApS, Lille Strandstræde 6A, st. th., 1254 København K, Denmark.

Technical Specifications

Part:
ST7735 TFT Color Display (160x80)
Interface:
Digital
Ports:
2 neighbouring ports
Current:
~25 mA
Size:
39.5 x 19.5 x 9.6 mm
Chip:
ST7735S (Sitronix)

Pins

3.3V (first port)
supply
GND (first port)
ground
Data A (first port)
DC, data/command select
Data B (first port)
CS, chip select
3.3V (second port)
supply
GND (second port)
ground
Data A (second port)
MOSI, data in
Data B (second port)
SCLK, serial clock

Key Features

  • →160x80 pixel resolution
  • →65K color depth
  • →Fast SPI interface

Common Applications

User interface
Data visualization
Status display
Graphics output
+ Use in Project

Technical

Display

Color Display

ST7735 TFT Color Display (160x80)
Interfacedigital
PortsTakes 2 adjacent ports; needs a port carrying digital
Current25 mA
Size39.5 × 9.64 × 19.5 mm (CAD bounding box)
DriverST7735_TFT

160x80 pixel color TFT display with ST7735 controller, SPI interface. Double module spanning two adjacent ports: DC on Line A1, CS on Line B1, MOSI on Line A2, SCLK on Line B2. Supports 65K colors (RGB565), text, shapes, and fast 40MHz SPI.

What it can do
  • display_text Display text at cursor position with configurable size and color
  • clear_display Clear the display to black
  • fill_screen Fill entire screen with a color
  • draw_pixel Draw a single pixel at x,y with color
  • draw_line Draw a line between two points
  • draw_rect Draw a rectangle outline
  • fill_rect Draw a filled rectangle
  • draw_circle Draw a circle outline
  • fill_circle Draw a filled circle
How it works
TFT COLOR DISPLAY (ST7735 160x80): TWO DRAWING MODES:

CHOOSING A MODE:
- DIRECT MODE for games, animations, or anything with moving objects.
  Call setDirectMode(true) once in setup. Draws go straight to the screen.
- CANVAS MODE (default) for static dashboards, sensor readouts, or full-screen redraws.
  Pattern: clear() → draw everything → display(). Flicker-free.

DIRECT MODE RULES (CRITICAL: violating these causes flashing/slowness):
  1. Call setDirectMode(true) and fillScreen() ONCE in setup.
  2. NEVER call fillScreen(), clear(), or display() in the game loop. These redraw the ENTIRE screen and cause visible flashing.
  3. To move an object: erase its OLD position with a small fillRect (background color), then draw at the NEW position.
  4. For text that changes (score): erase the old text area with a small fillRect, then redraw the text.
  5. For static elements (ground line): draw once in setup or when entering a state, NOT every frame.
  6. When switching screens (title→playing, playing→gameover): call fillScreen() ONCE to clear, then draw the new screen.

DIRECT MODE EXAMPLE (game loop):
  // Save old positions BEFORE updating physics
  int oldDinoY = dinoY;
  int oldObsX = obsX;
  // Update physics...
  dinoY += velocity;
  obsX -= speed;
  // Erase old positions with small rects (NOT fillScreen!)
  fillRect(dinoX, oldDinoY, dinoW, dinoH, BG_COLOR);
  fillRect(oldObsX, obsTop, obsW, obsH, BG_COLOR);
  // Draw at new positions
  fillRect(dinoX, dinoY, dinoW, dinoH, DINO_COLOR);
  fillRect(obsX, obsTop, obsW, obsH, OBS_COLOR);

CANVAS MODE PATTERN (dashboards/UIs):
  // In loop: clear() → draw everything → display().

GENERAL RULES:
- print() takes ONE argument only. NEVER pass coordinates to print().
- To print at a position: setCursor(x, y) THEN print(value). Two separate calls.
- Or use displayText(text, x, y, size, color) for positioned text in one call.
- Available colors: ST7735_BLACK, ST7735_WHITE, ST7735_RED, ST7735_GREEN, ST7735_BLUE, ST7735_YELLOW, ST7735_CYAN, ST7735_MAGENTA, ST7735_ORANGE.
- Screen is 160x80 pixels.
- SMOOTH FONTS: For text larger than size 1, ALWAYS use smooth FreeType fonts instead of setTextSize().
  setTextSize(2+) scales the tiny 5x7 bitmap and looks blocky. Smooth fonts look much better.
  Usage: #include <Fonts/FreeSansBold12pt7b.h>, then setFont(&FreeSansBold12pt7b) before printing.
  After setFont(), always use setTextSize(1); the font itself defines the size.
  IMPORTANT: With custom fonts, Y coordinate is the text BASELINE, not top-left. Add font height to Y.
  Available smooth fonts: FreeSans9pt7b, FreeSans12pt7b, FreeSansBold9pt7b, FreeSansBold12pt7b, FreeSansBold18pt7b, FreeSansBold24pt7b.
  To return to the small default font: setFont(NULL) then setTextSize(1).
  Example for big text: setFont(&FreeSansBold12pt7b); setTextSize(1); setCursor(10, 30); print("Hello");
  displayText() uses setTextSize() internally so AVOID it for large text. Use setFont + setCursor + print instead.
Suggested control

A text input labeled 'Display text' plus a Send button that dispatches a display-text action. Add 4-6 color preset chips that send a foreground-color action, and a small preview tile showing the last text that was sent.

Pinout
Port 1
PinLineDirFunction
1HV–not connected
25V–not connected
33.3Vinputsupply
4GND–ground
5Data AinputDC, data/command select
6Data BinputCS, chip select
Port 2
PinLineDirFunction
7HV–not connected
85V–not connected
93.3Vinputsupply
10GND–ground
11Data AinputMOSI, data in
12Data BinputSCLK, serial clock

from p2p/ground_truth/hardware/prototyping_line/modules/screen.md

Chip
ST7735SN096-1608TSitronixdatasheet ↗

assembly->controller: N096-1608T is the panel assembly's ordering code; ST7735S is the controller inside it