background image

 

PSoC 6 TFT Display Interface with EmWin Graphics Library 

www.cypress.com

 

Document Number: 002-23726 Rev. *B 

PSoC Creator generates the configuration files for EmWin under the 

Shared Files

 folder as shown i

Figure 11

. 

Figure 11. Configuration Files Generated 

 

5.  Open the 

LCDConf.c

 file and configure the X and Y sizes of the display, the color palette, and display driver.   

Figure 12. Setting the X and Y Values and Color Conversion 

 

The ST7789S 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  user  guide  Section  15.6 

“Fixed  Palette  Modes”,  this  color  palette  is  named 

GUICC_M565. 

The ST7789S controller is supported by the FlexColor driver; therefore, set the driver to 

GUI_FLEXCOLOR

6.  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.   

Содержание 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...

Отзывы: