2.4" Touch LCD Painter Demo on Atlas-SOC
This demonstration shows how to implement the painter demonstration on 2.4" LCD with Atlas-SoC development board

28 Sep 2016 - 06:47 | Version 14 | | , , |

Board: Atlas-SoC Development Platform
State: closed
Members: JohnnyFan

This demonstration shows how to implement the painter demonstration on Terasic 2.4" Touch LCD (LT24) with Atlas-SoC development board. The demo is designed in Qsys and running by Nios II processor. Altera SPI IP in Qsys is used to retrieve the touch information from the touch screen. Terasic custom display component in Qsys is used to display image on the 2.4” LCD. This demo requires the following hardware:

  • Atlas-SoC development board
  • LT24 LCD touch module

Description

Figure 1 shows the Graphical User Interface (GUI) of Painter demo. The GUI is composed by three sections: Painting Area, Clear Button, and Color Palette. Users can select a color from the color palette and start drawing in the paint area. Click the “Clear” button to clear the painting area.

Error: (3) can't find figure1.jpg?t=1450756476 in Projects
Figure 1 GUI of Painter demo

Figure 2 displays the painting on the canvas area.

figure2.jpg

Figure 2 Painting demo running on LT24 with Atlas-SoC development board

System Description

Figure 3 shows the system block diagram of Painter demonstration. Terasic custom Qsys component - LT24 LCD controller is used to display 240(H) x 320(V) image. Its source code is located in the “/ip/LT24_Controller” folder of Painter demo project. Qsys built-in SPI controller is used to communicate with the AD7843 ADC via SPI interface to retrieve data from the touch screen. The Nios II program handles touch event and image display. It is stored in either on-chip memory or external memory. The LCD module should be initialized before sending image data to the LCD for image display.

figure3.jpg

Figure 3 System block diagram of Painter demonstration

LT24 LCD Controller

The LT24 LCD controller is a custom Qsys component developed by Teraisc. Its source code is located in the “/ip/LT24_Controller” folder of Painter demo project. Table 1 shows the register definition of LT24 LCD controller. The controller base address is defined as LT24_BASE in the Nios II program. The function of writing a control command to the LCD driver is IOWR(LT24_ BASE, 0x00, CommandValue). The function of writing data to the LCD driver is IOWR(LT24_BASE, 0x01, DataValue).

Table 1 Register Definition and Offset for the Painter Demonstration

Setup Painter Demo on Atlas-SoC Board

Hardware Setup

Figure 4 shows the demo setup of LT24 with Atlas-SoC development board. The LT24 should be installed on the GPIO expansion header of Atlas-SoC development board.

figure4.jpg

Figure 4 Hardware setup of LT24 with Atlas-SoC development board

Execute Demonstration

Please follow the procedures below to setup the demonstration:

1. Makesure the Atlas-SoC development board is power off.

2. Mount the LT24 onto the 2x20 GPIO 0 expansion header of Atlas-SoC development board.

3. Connect the USB-Blaster USB port of Atlas-SoC development board to the USB port of host PC with a USB cable.

4. Connect Power Adapter to the Atlas-SoC development board.

5. Both Quartus II and USB-Blaster II driver must be installed on the host PC.

6. Dowanload and unzip the file " Atlas-SoC_LT24_Painter.zip" to PC and execute test.bat" in "demo_batch" folder.

7. The Painter demo should be up and running on the LCD.

Design Resource

For more information of LT24 daughter card, please refer to Terasic's product website : LT24 Card

Give us your feedback

© 1999-2018 RocketBoards.org by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.