background image

 

 

CE223726 – PSoC 6 TFT Display Interface 

with EmWin Graphics Library 

 

 

 

 

 

 

 

www.cypress.com

 

Document Number: 002-23726 Rev. *B 

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.  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  to  PSoC  6  MCU,  see  the  application  note 

AN210781 

–  Getting  Started  with  

PSoC 6 MCU with Bluetooth Low Energy (BLE) Connectivity

. 

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

 (PDL) 3.0.4  

Programming Language:

 C (Arm

®

 GCC 5.4.1) 

Associated Parts: 

 

All PSoC 6 MCUs 

 

Related Hardware:

  

CY8CKIT-062-BLE PSoC 6 BLE Pioneer Kit

CY8CKIT-028-TFT TFT Shield

 

Hardware Setup 

1.  Plug in the TFT display shield on to the Pioneer Board as 

Figure 1

 shows.   

Figure 1. Hardware Setup 

 

2.  Set the switches and jumpers on the Pioneer Board as shown in Table 1. 

Table 1. Switch and Jumper Selection 

Switch/Jumper 

Position 

Location 

SW5 

3.3 V 

Front 

SW6 

PSoC 6 BLE 

Back 

SW7 

V

DDD

 / KitProg2 

Back 

J8 

Installed 

Back 

Содержание CE223726

Страница 1: ...Integrated Design Environment IDE If you are new to PSoC 6 MCU see the application note AN210781 Getting Started with PSoC 6 MCU with Bluetooth Low Energy BLE Connectivity For details of EmWin Graphi...

Страница 2: ...IT 062 BLE kit guide for details on how to program firmware into the device The TFT display shows the startup screen for three seconds followed by a screen that displays instructions to press SW2 to s...

Страница 3: ...PSoC 6 TFT Display Interface with EmWin Graphics Library www cypress com Document Number 002 23726 Rev B 3 Figure 3 Startup Screen and Instructions Screen...

Страница 4: ...lay Interface with EmWin Graphics Library www cypress com Document Number 002 23726 Rev B 4 Figure 4 Pages Shown in Sequence Important Note When you build the project you will see the following notifi...

Страница 5: ...TFT shield has a Newhaven 2 4 320 240 TFT display with a Sitronix ST7789 display controller and uses the 8080 Series Parallel Interface There are two important parts in this code example 1 EmWin Grap...

Страница 6: ...iver Library Under the Graphics emWin section select the Core and LCD Driver options Figure 7 Build Settings 2 Select the nOSnTS option for Core because this project does not use RTOS or Touch support...

Страница 7: ...controller has a resolution of 240x320 pixels This controller supports various color palettes This project uses the 16 bits per pixel RGB 5 6 5 color palette 5 bits R 6 bits G 6 bits G Per the EmWin...

Страница 8: ...esolutions the orientation is set to swap X and Y axes and mirror the Y axis CONFIG_FLEXCOLOR Config 0 Config Orientation GUI_MIRROR_Y GUI_SWAP_XY GUIDRV_FlexColor_Config pDevice Config The PortAPI st...

Страница 9: ...nent SW2 is a digital input that is connected to SW2 on the CY8CKIT 062 BLE kit This pin is configured as Resistive Pull Up SW2 is connected to a Status Register to read the switch status A 100 Hz clo...

Страница 10: ...ister Status_SW2 This status register is used to read SW2 status See the PSoC Creator project for more details on PSoC Component configurations and design wide resource settings Related Documents Appl...

Страница 11: ...ment Title CE223726 PSoC 6 TFT Display Interface with EmWin Graphics Library Document Number 002 23726 Revision ECN Orig of Change Submission Date Description of Change 6299269 GRAA 09 18 2018 New cod...

Страница 12: ...n Cypress hardware or software products Cypress shall have no liability arising out of any security breach such as unauthorized access to or use of a Cypress product CYPRESS DOES NOT REPRESENT WARRANT...

Отзывы: