Skip to content
  • Home
  • Account
  • Restricted content
  • OBEX
  • Chips Tips
  • Logout
  • Shop
  • QuickBytes
Propeller OBEX
  • OBEX
  • Forum
Login
Propeller OBEX

Propeller 2

  • Configuring Visual Studio Code for Programming the P2 on Mac, Windows, and Linux
  • Breakout Board Options for P2 Edge Modules
  • Solar Panel Monitoring Demo (Intro to Using Video 3 of 3)
  • Wireless Programming with the ESP8266 WX Module
  • Brushless DC Motor Control Demo
  • Colorful Terminal Output with ANSI Escape Sequences
  • XBee RF Transparent and API Mode Demo
  • DS3231 Real Time Clock I2C Demo
  • Multiple Servo Control (up to 64) Object
  • Multiple Serial Port (8 UART – 16 Tx/Rx) Object
  • Goertzel Operation with Ultrasonic Transducers
  • Web Page Control of WS2811 LEDs Using the IoT Gateway on Raspberry Pi
  • 320×240 LCD Driver for ILI9341 Controller and XPT2046 Touch Screen
  • Digital Sample ADC to DAC + Analog Frequency to DAC
  • Using Smart Pins to Measure Frequency Output of TSL235R Light-to-Frequency Sensor
  • Ping))) Ultrasonic Distance Sensor with Graphical Debug Demo
  • Simple Analog Input
  • P2 Edge 16 MB Flash Reader and Explorer Utility
  • LED Matrix used as an I/O Test Utility
  • Arlo Conversion to P2 with the Universal Motor Controller
  • Five Buttons On One Pin
  • P2 RTC Add-on Board Demo
  • Simple Video Driver – Using Images (Intro to Using Video 2 of 3)
  • Starting Your P2 Project with a Spin2 Template
  • E-Ink Display Demo
  • MAX7219 LED Display SPI Demo
  • DHT11, DHT22, CM2302 Humidity and Temperature Sensor Object
  • NMEA GPS String Parsing
  • Floating Point Math: DEBUG and Terminal Display Example
  • LEDs – Beyond the Basics
  • Quadrature Encoder Object
  • P2 RTC Add-on with GPS Module
  • DVI/VGA Text Driver Demo
  • PCF8574 I2C LCD Demo
  • Simple Sound Engine Demo
  • 1-Wire Driver with DS18B20 Temperature Sensor Demo
  • Send Email from the Propeller 2 Using the IoT Gateway on Raspberry Pi
  • I2C Device Bus Scanner Utility
  • 32-Channel ADC Object
  • Tetris
  • Video Hardware with Character Map Demo (Intro to Using Video 1 of 3)
  • WS2811, WS2812, WS2812b, WS2813, SK6812x NeoPixel Object
View Categories
  • Home
  • Docs
  • Quick Bytes
  • Propeller 2
  • 320×240 LCD Driver for ILI9341 Controller and XPT2046 Touch Screen

320×240 LCD Driver for ILI9341 Controller and XPT2046 Touch Screen

Reading Time: 1 min read

Description #

The driver from forum members Cluso99, Greg LaPolla, and Mike Roberts make it very easy to draw lines, blocks, circles, graphs, and text of any color, and an analog clock face on an ILI9341 (or similar) LCD, with selective area updates. The driver provides pixel-level control and two fonts. 

The ILI9341 (or ST7796S, ILI9163, and probably many others) are a multi-color single-chip controller for Liquid Crystal Displays (LCD) with a resolution of 128 x 128 (1.44″), 240 x 320 (2.2″, 2.4″, 2.8″, 3.2″), or 320 x 480 (3.5″, 4.0″). The ILI9341 supports a serial peripheral interface (SPI) with selective window area updates. The XPT2046 is an optional touch screen controller that uses a 4-wire resistive touch screen control system with a 12-bit 125 Khz A/D converter to detect the location of the touched screen and touch screen pressure.  

This driver supports both the ILI9341 and XPT2046. On eBay and Amazon you’ll find many ILI9341 240 x 320 displays in 2.4″ and 3.2″ sizes, without and without the XPT2046 driver chip. AliExpress is also a good source.  

The driver is self-documenting and very easy to use. It only requires you to choose the display resolution and whether or not the touch screen is present. Choose the display you are using by removing the comment marks from LCD_Graphics_Demo.spin2. 

Next, choose your I/O pins. The I/O pins are defined in the lower level object, LCD_ILI9341_XPT2046.spin2 (LCD_Graphics_Driver.spin2). 

Parts Used #
  • P2 Edge Module
  • P2 Edge Breadboard
  • 320x240 LCD with ILI9341 controller and XPT2046 touch screen (commonly available on Amazon)
Source Code #
  • lcd_graphics_driver_3.0.zip
Programming Language #
  • Spin 2
  • PASM2
Tools and Operating System #
  • Propeller Tool for Windows
  • FlexProp for Windows, Mac and Linux
Additional Resources #
  • Propeller 2 Spin Documentation
Document Author #
  • Ken Gracey
Source Code Author #
  • Greg LaPolla / Cluso99 / Mike Roberts
Was this useful ?

Share This Article :

  • Facebook
  • X
  • LinkedIn
Still stuck? How can we help?

Still stuck? How can we help?

Updated on September 29, 2026
Web Page Control of WS2811 LEDs Using the IoT Gateway on Raspberry PiDigital Sample ADC to DAC + Analog Frequency to DAC
Table of Contents
  • Description
  • Parts Used
  • Source Code
  • Programming Language
  • Tools and Operating System
  • Additional Resources
  • Document Author
  • Source Code Author

Copyright © 2026 - Parallax Inc.
599 Menlo Drive | Rocklin, CA 95765 | USA