Cypress CE223726 Getting Started

Cypress CE223726 Getting Started

Psoc 6 tft display interface with emwin graphics library

Advertisement

Quick Links

Objective
This code example shows how to control a TFT display using EmWin Graphics Library in PSoC
Overview
This code example demonstrates how to display graphics on a TFT display using EmWin Graphics Display Library. EmWin
graphics library implements 2D graphics and provides easy-to-use API functions to display text, 2D graphics (lines, rectangles,
circles, etc.), and bitmap images. In PSoC Creator™, EmWin graphics library is implemented as a PDL middleware library.
This code example assumes that you are familiar with the PSoC 6 MCU and the PSoC Creator Integrated Design Environment
(IDE).
If
you
are
new
PSoC 6 MCU with Bluetooth Low Energy (BLE)
For details of EmWin Graphics Library API, see the EmWin documentation UM03001_emWin5.pdf in the Program Files
(x86)\Cypress\PDL\3.x.x\doc\ folder.
Requirements
Tool:
PSoC Creator
4.2;
Peripheral Driver Library
Programming Language: C (Arm
Associated Parts:
All PSoC 6 MCUs
Related Hardware:
CY8CKIT-062-BLE PSoC 6 BLE Pioneer
Hardware Setup
1.
Plug in the TFT display shield on to the Pioneer Board as
2.
Set the switches and jumpers on the Pioneer Board as shown in Table 1.
www.cypress.com
CE223726 – PSoC 6 TFT Display Interface
to
PSoC
6
MCU,
see
Connectivity.
(PDL) 3.0.4
®
GCC 5.4.1)
Figure 1. Hardware Setup
Table 1. Switch and Jumper Selection
Switch/Jumper
SW5
SW6
SW7
J8
Document Number: 002-23726 Rev. *B
with EmWin Graphics Library
the
application
note
Kit,
CY8CKIT-028-TFT TFT Shield
Figure 1
shows.
Position
Location
3.3 V
Front
PSoC 6 BLE
Back
V
/ KitProg2
Back
DDD
Installed
Back
®
6 MCU.
AN210781
Getting
Started
with
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CE223726 and is the answer not in the manual?

Questions and answers

Summary of Contents for Cypress CE223726

  • Page 1 CE223726 – PSoC 6 TFT Display Interface with EmWin Graphics Library Objective ® This code example shows how to control a TFT display using EmWin Graphics Library in PSoC 6 MCU. Overview This code example demonstrates how to display graphics on a TFT display using EmWin Graphics Display Library. EmWin graphics library implements 2D graphics and provides easy-to-use API functions to display text, 2D graphics (lines, rectangles, circles, etc.), and bitmap images.
  • Page 2: Software Setup

    2D graphics with concentric circles and ellipses, and rectangles with gradient fills • Concentric circles • Bitmap image Figure 3 shows the startup and instructions screens. Figure 4 shows all the screens that are shown in sequence. www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 3 PSoC 6 TFT Display Interface with EmWin Graphics Library Figure 3. Startup Screen and Instructions Screen www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 4 PSoC 6 TFT Display Interface with EmWin Graphics Library Figure 4. Pages Shown in Sequence Important Note: When you build the project, you will see the following notification. Click OK. www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 5 The library also communicates with the display driver using the 8-bit parallel interface implemented using the GraphicLCDIntf Component, and the LCD access routines defined in the LCDConf.c file. Application Code: The application code calls the EmWin graphics APIs to perform various graphics functions. www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 6 Select the nOSnTS option for Core because this project does not use RTOS or Touch support. Figure 8. Core Option Select “FlexColor” option for the “LCD Driver” parameter. This driver supports the ST7789 display controller. Figure 9. Select LCD Driver Options Click Generate Application. Figure 10. Generate Application www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 7 In the LCDConf.c file, write code in the _InitController function to initialize the hardware interface and display controller. The EmWin library calls this function during the initialization stage. Some code snippets from this function are shown below. www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 8 The GUI_X.c file has timing functions used by the EmWin library. The content of this file varies based on the OS support selected. No modifications are required in this file for this code example. www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 9 Figure 14. Port Pin Configuration for GraphicLCDIntf and SW2 Firmware: The main application is implemented in the main_cm4.c file. The following functions are performed in main: Initializing the EmWin graphics engine Displaying the startup screen www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 10: Related Documents

    PSoC 6 MCU: PSoC 63 with BLE Datasheet PSoC 6 MCU: PSoC 63 with BLE Architecture Technical Reference Manual Development Kit Documentation CY8CKIT-062-BLE PSoC 6 BLE Pioneer Kit Training Videos PSoC 6 101: Lesson 1-4 FreeRTOS www.cypress.com Document Number: 002-23726 Rev. *B...
  • Page 11: Document History

    PSoC 6 TFT Display Interface with EmWin Graphics Library Document History Document Title: CE223726 – PSoC 6 TFT Display Interface with EmWin Graphics Library Document Number: 002-23726 Orig. of Submission Revision Description of Change Change Date 6299269 GRAA 09/18/2018 New code example...
  • Page 12: Technical Support

    To the extent permitted by applicable law, Cypress reserves the right to make changes to this document without further notice. Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document.

Table of Contents