background image

 

PSoC 6 TFT Display Interface with EmWin Graphics Library 

www.cypress.com

 

Document Number: 002-23726 Rev. *B 

12 

Worldwide Sales and Design Support 

Cypress maintains a worldwide network of offices, solution centers, manufacturer’s representatives, and distributors. To find the 
office closest to you, visit us at 

Cypress Locations

. 

Products 

Arm

®

 Cortex

®

 Microcontrollers 

cypress.com/arm

 

Automotive 

cypress.com/automotive

 

Clocks & Buffers 

cypress.com/clocks

 

Interface 

cypress.com/interface

 

Internet of Things 

cypress.com/iot

 

Memory  

cypress.com/memory

 

Microcontrollers 

cypress.com/mcu

 

PSoC 

cypress.com/psoc

 

Power Management ICs 

cypress.com/pmic

 

Touch Sensing 

cypress.com/touch

 

USB Controllers 

cypress.com/usb

 

Wireless Connectivity 

cypress.com/wireless

 

PSoC

®

 Solutions 

PSoC 1

 

PSoC 3

 

PSoC 4

 

PSoC 5LP

 |

 PSoC 6 MCU 

Cypress Developer Community 

Community

  

Code

 

Examples

  

Projects

  

Videos

  

Blogs

  

| 

Training 

Components

 

Technical Support 

cypress.com/support

All other trademarks or registered trademarks referenced herein are the property of their respective owners. 

 

 Cypress Semiconductor 

 198 Champion Court 

 San Jose, CA 95134-1709 

© Cypress Semiconductor Corporation,  2018-2019. 

This document is the property of Cypress Semiconductor Corporation and its subsidiaries (“Cypress”).  This 

document, including any software or firmware included or referenced in this document (“Software”), is owned by Cypress under the intellectual property laws and 
treaties of the United States and other countries worldwide.  Cypress reserves all rights under such laws and treaties and does not, except as specifically stated in 
this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property rights.  If the Software is not accompanied by a license 
agreement and you do not otherwise have a written agreement with Cypress governing the use of the Software, then Cypress hereby grants you a personal, non-
exclusive, nontransferable license (without the right to sublicense) (1) under its copyright rights in the Software (a) for Software provided in source code form, to 
modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organization, and (b) to distribute the Software in binary 
code form externally to end users (either directly or indirectly through resellers and distributors), solely for use on Cypress hardware product units, and (2) under 
those claims of Cypress’s patents that are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely 
for use with Cypress hardware products.  Any other use, reproduction, modification, translation, or compilation of the Software is prohibited. 

TO THE EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS 
DOCUMENT  OR  ANY  SOFTWARE  OR  ACCOMPANYING  HARDWARE,  INCLUDING,  BUT  NOT  LIMITED  TO,  THE  IMPLIED  WARRANTIES  OF 
MERCHANTABILITY AND  FITNESS  FOR A PARTICULAR PURPOSE.   No  computing device can be  absolutely  secure.  Therefore, despite securi ty measures 
implemented in 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,  OR  GUARANTEE  THAT  CYPRESS  PRODUCTS,  OR  SYSTEMS  CREATED  USING 
CYPRESS  PRODUCTS,  WILL  BE  FREE  FROM  CORRUPTION,  ATTACK,  VIRUSES,  INTERFERENCE,  HACKING,  DATA  LOSS  OR  THEFT,  OR  OTHER 
SECURITY  INTRUSION  (collectively,  “Security  Breach”).    Cypress  disclaims  any  liability  relating  to  any  Security  Breach,  and  you  shall  and  hereby  do  release 
Cypress from any  claim, damage,  or other liability  arising  from any Security  Breach.   In addition, the products  described in these materials may contain  design 
defects or errors known as errata which may cause the product to deviate from published specifications.  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.  Any information provided in this document, including any sample design information or programming code, is provided only for reference 
purposes.    It  is  the  responsibility  of  the  user  of  this  document  to  properly  design,  program,  and  test  the  functionality  and  safety  of  any  application  made  of  this 
information  and  any  res

ulting  product.   “High-Risk Device” means any device or system  whose failure could cause  personal injury, death,  or  property  damage.  

Examples of High-

Risk Devices are weapons, nuclear installations, surgical implants, and other medical devices.  “Critical Component” means any component of a 

High-Risk Device whose failure to perform can be reasonably expected to cause, directly or indirectly, the failure of the High-Risk Device, or to affect its safety or 
effectiveness.  Cypress is not liable, in whole or in part, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from any use 
of a Cypress product as a Critical Component in a High-Risk Device.  You shall indemnify and hold Cypress, its directors, officers, employees, agents, affiliates, 
distributors, and assigns harmless from and against all claims, costs, damages, and expenses, arising out of any claim, including claims for product liability, personal 
injury or death, or property damage arising from any use of a Cypress product as a Critical Component in a High-Risk Device.  Cypress products are not intended 
or authorized for use as a Critical Component in any High-

Risk Device except to the limited extent that (i) Cypress’s published data sheet for the product explicitly 

states Cypress has qualified the product for use in a specific High-Risk Device, or (ii) Cypress has given you advance written authorization to use the product as a 
Critical Component in the specific High-Risk Device and you have signed a separate indemnification agreement. 

Cypress, the Cypress logo, Spansion, the Spansion logo, and combinations thereof, WICED, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or 
registered trademarks of Cypress in the United States and other countries.  For a more complete list of Cypress trademarks, visit cypress.com.  Other names and 
brands may be claimed as property of their respective owners.

 

 

Summary of Contents for CE223726

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

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

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

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

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

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

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

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

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

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

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

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

Reviews: