psoc 6 tft display free sample
This example demonstrates displaying 2D graphics on a TFT display using the emWin graphics library and the AppWizard GUI design tool in FreeRTOS. The application initializes the system peripherals and creates a task that cycles through demo images in response to button presses.
This code example requires CY8CKIT-028-TFT; TFT display shield board. This shield comes with PSoC™ 6 Wi-Fi Bluetooth® pioneer kit. It can also be purchased standalone and used with other supported kits.
Note: The PSoC™ 6 Bluetooth® LE pioneer kit (CY8CKIT-062-BLE) and the PSoC™ 6 Wi-Fi Bluetooth® pioneer kit (CY8CKIT-062-WIFI-BT) ship with KitProg2 installed. The ModusToolbox™ software requires KitProg3. Before using this code example, make sure that the board is upgraded to KitProg3. The tool and instructions are available in the Firmware Loader GitHub repository. If you do not upgrade, you will see an error like "unable to find CMSIS-DAP device" or "KitProg firmware is out of date".
The following example clones the "mtb-example-psoc6-emwin-tft-freertos" application with the desired name "EmwinTftFreeRtos" configured for the CY8CKIT-062-WIFI-BT BSP into the specified working directory, C:/mtb_projects:
project-creator-cli --board-id CY8CKIT-062-WIFI-BT --app-id mtb-example-psoc6-emwin-tft-freertos --user-app-name EmwinTftFreeRtos --target-dir "C:/mtb_projects"
If using a PSoC™ 64 "Secure" MCU kit (for example, CY8CKIT-064B0S2-4343W, CY8CKIT-064S0S2-4343W), the PSoC™ 64 device must be provisioned with keys and policies before being programmed. Follow the instructions in the "Secure Boot" SDK user guide to provision the device. If the kit is already provisioned, copy-paste the keys and policy folder to the application folder.
Observe the startup screen with the Infineon logo on the display. Follow the instructions that come on the screen after two seconds. Press the user switch to move between pages when the user LED is OFF.
This project uses a CY8CKIT-028-TFT; TFT display shield together with a pioneer board. The TFT shield has a Newhaven 2.4″ 320×240 TFT display with a Sitronix ST7789 display controller and uses the 8080-series parallel interface.
emWin middleware documentation on GitHub for understanding the structure of the emWin package, supported drivers, and a quick start guide to create and run your first emWin project from scratch. The documentation page also contains configuration details on a wide variety of display drivers provided by emWin.
AppWizard project: The GUI that is displayed on the screen is designed using the AppWizard software. The code example includes the corresponding AppWizard project.
Major update to support ModusToolbox™ v3.0. This version is not backward compatible with previous versions of ModusToolbox. Migrated the CE to use the latest emWin version V1.30_6.26d
Cypress, the Cypress logo, and combinations thereof, WICED, ModusToolbox, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or registered trademarks of Cypress or a subsidiary of Cypress in the United States or in 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.
This code example demonstrates how to use TFT Display available with CY8CKIT-062-WiFi-BT to print text messages. It also demonstrates how to use CapSense slider to control the intensity of a LED.
This example uses the TFT display driver available withCE222494 -PSoC 6 WICED WiFi Demoand the µGUI framework available in WICED Studio to control the TFT Display.
CapSense library available for CY8CKIT_062 platform (PSoC 6 MCU+LBEE5KL1DXmodule) in the WICED Studio is used for detecting the CapSense buttons touch and slider position.
2. Copy the extracted "PSoC_6_MCU" folder to WICED Studio installation directory under following path:
2. Slide your finger on the CapSense slider to change the intensity of the on-board LED. Also observe that the current finger position is shown on the display.
I had a tragic incident with the PSoc 6 kit. The first kit that I received turned out to be faulty , there were overheating issues which would end up the board being power off. But people at cypress were kind enough to send me another one .
A special note on the CY8CKIT-028-TFT Board , as is one of the main attraction of kit and houses a lost of sensors ( some of them don"t have huge software support , so you might explore them on your own such as PDM examples and DAC examples)
The Kit comes pre-installed WICED WiFi demo. This demo is meant to test the functionality of onboard WiFi-BT combo module along with CapSense touch slider, ambient light sensor and TFT display and use buttons.
In this demo, upon power up the kit becomes a WiFi hotspot with a SSID of “WICED Config” and password shown on the display. It hosts a wifi setup webpage where you can easily configure it to connect with one of the local WiFi network in STA mode. After successful configuration and it hosts another webpage that displays the voltage of the ambient light sensor on the CY8CKIT-028-TFT shield. It also displays the current duty cycle of a PWM controlling the red LED on the kit. During this demo also it is also printing data over a UART to a terminal window.
This question been haunting even after finishing the project. There are variety of IDEs that the PSoC support each one is suitable for specific application. I guess most of the time you would be juggling between IDEs . The cross-support for each IDE is available , but still is in the initial phase and for my experience wasn"t much of a help. I would give overview of the options available :
(Highly Recommended) it is easy to use programming environment for PSoC6 series mcu. If someone has prior working experience with STCubeMX, Atmel Start or MPLAB X etc then the transition from any of those tool to this one will be very smooth. It has "Select Middleware" option similar to ATMEL start. Where as the device configurator work and look like similar to STCubeMX but with added benefit of device configuration from within the IDE. The live code preview in device configurator help a lot in finding the function/identifier of each option. It will be the first Cypress IDE that will support MCU programming with WiFi/WiFi-BT combo device support (coming soon). PSoC6 mcu has built in CapSense technology and this software provide perfect tools to configure and tune the touch inputs and values. The CapSense tuner help in calculating the threshold values on the go instead of multiple times reprogramming to obtain the desired results. It is also recommended by the Cypress to use Modus Toolbox for programming the PSoC6 MCU.
It is oldest PSoC programming IDE with lots of user base.This mean there is lot of online help/projects available for this IDE. But the transition from other programming tools to this one will not be very simple. The interface is seems cluttered and you will take some time to getting used to it. But after some time you will feel comfortable working with it. The graphical programming interface makes working with PSoC6 device simple and for a time being you start believing that your working with FPGA. It has builtin PSoC Creator Tuner (CapSense Tuner).
For all those kits that uses external WiFi-BT combo modules, this is the only possible option currently (in future Modus toolbox will also get these capabilities). As our PSoC6 WiFi-BT Pioneer Kit use external WiFi-BT combo module therefore it is only IDE that can be use to built wireless applications. Currently Zerynth Studio only support WiFi networking option so for BLE application we have no other choice except WICED studio. Its interface is eclipse based and similar to Modus Toolbox so switching from either one of these to other is not a big problem
My preferred choice my Modustoolbox as I was more familiar with eclipse based development evniroment. If you want project involves more of tinkering with hardware you can go for PSoC creator has it support hasle free initialisation and creation of hardware using PDL libraries. As of my knowledge creating a wireless communication project with other than Modustoolbox is quite challenging.
In the previous Article (Part 1), I used an Arduino and two open source libraries to figure out the startup configuration sequence for a low cost 2.4″ TFT from MCUFriend. In Part 2, I will show you how to use that information to make a driver for a PSoC 6 running the Segger emWin graphics library.
Cypress has delivered a code example for the CY8CKIT-028-TFT shield called CE223726. This CE has all of the hardware connection setup for that shield, plus the integrated emWin middleware and a simple main that just displays 9 different screens.
The shield has a Newhaven 2.4″ 320×240 TFT with a Sitronix ST7789 driver. This display uses the “8080” interface for the display, the same parallel interface as my MCUFriend shield.
When you filter the list to “tft” by typing in the “Filter by” box you will see CE223726…. select it, then press “Create Project”. If it is not on your computer you need to press the little world symbol to download it.
Now on with modifying the project. First, you notice that the 2.4″ TFT shield has a different pin out than the CY8CKIT-028-TFT. Here is a picture of the back of the shield:
All right, you can see that the pins are different, so, the first step in fixing this project is to remap the pins to match the shield. Open up the Design Wide Resource pin configuration screen from the Workspace Explorer. And assign the Shield Pins to the correct PSoC 6 pins. Notice that I added a UART (which you can ignore)
The next thing that I need to do is update the schematic to reflect the ILI9341 speed. On page 226 of the ILI9341 datasheet you can see that during a write cycle the write pulse needs to be low twrl=15ns and high twrh=15ns and the whole cycle needs to be at least 66ns. For the read cycle the read pulse low trdl=45ns and the trdh=90ns. Unfortunately, I dont know what an “FM” read is versus a “ID” read… so I am going to assume we only do “ID” reads.
Armed with all of that information, we need to pick 3 numbers. An input clock, the # of read low pulse and the # of read high pulses. The write cycle needs to be at least 66ns so we need a minimum clock frequency of 30MHz which will have a period of 33ns. For the read we need 45ns low and 90ns high and a total of 160ns. This means the whole read cycle needs to be 160ns/33ns=4.8 clock cycles. To achieve this ill select 2 low (for 66ns) and 3 high (99 ns) total 165ns.
But wait. Why is the pulse width 40ns and 80ns? That means that the input clock is set to 25MHz (40ns period). Well it turns out that is exactly right. But if we typed in 30MHz how did we end up with 25MHz? If you look on the clocks tab of the design wide resources you will find that the source of the LCD_Clock is the Clk_Peri and it is running at 50MHz. When PSoC Creator figures out a clock, it can only choose a whole number divider, also known a 2 to synthesize the LCD_Clk, which means that the output frequency will actually be 25MHz. I am pretty sure that I could move things around and figure out a combination of dividers and clock frequencies to make it work, but that isnt the point today so Ill just move forward.
The driver is specified from table 33.42 on page 1193 of the emWin manual. Specifically, you tell it to use GUIDRV_FLEXCOLOR_F66709 which you can see support ILI9341 amongst others.
Then you need to tell what bus interface to use. When we setup the display, we told it that we wanted 16-bit color by sending 0x3A, 0x55. Here is a screen shot from the ILI9341 datasheet.
Now you need to tell it what bits mean what color. For this display 16-bit color is encoded at 5-bits of Red, 6-bits of Green and 5-bits of Blue. On Page 65 of the ILI9341 datasheet you can see that we should send 8-bits of command, 5 bits of red, 6-bits of green, 5-bits of blue, then the next pixel.
Now, the other little nasty part of things is that if I had written BGR=0 it still would not have worked. It turns out that emWin overwrites that bit when it rotates the screen. Why? Who the hell knows. Anyway, here is what Oleksandr says, “In your code in the initialization sequence you set 0x36 register to 0x48 so, BRG mode must be active and GUICC_565 palette must be correct. But FlexColor driver itself writes to the 0x36 register in order to setup display orientation. By default, driver set the BRG bit to zero, activating RGB mode.” Here is a rather vague description of what happens from the emWin documentation. [There is still an error here]
With the color order sorted out, the last thing that I change is the orientation of the display on line 309. Here is the entire configuration function:
The following article explains all necessary steps to create an Embedded Wizard UI application suitable for the PSoC 62S2 Wi-Fi BT Pioneer Kit (CY8CKIT-062S2-43012). Please follow these instructions carefully and step by step in order to ensure that you will get everything up and running on your target. In case you are not familiar with Embedded Wizard, please read first the Quick Tour tutorial to understand the principles of Embedded Wizard and the GUI development workflow.
Since the PSoC 62S2 Wi-Fi BT Pioneer Kit (CY8CKIT-062S2-43012) does not contain a display onboard, it can be combined easily with an external display controller, like the ST7789V or others. These types of display controllers can be accessed very easy by using the SPI or parallel data interfaces and they contain their own display memory. As a result, the entire framebuffer can be located inside the display controller and only a small scratch-pad buffer is needed inside the micro-controller (MCU). For this purpose, Embedded Wizard supports a partial display update, that makes it possible to update the display in sequential small areas. This makes it possible to operate with a scratch-pad buffer of a few kilobytes instead of a full-screen framebuffer within the memory space of the MCU.
Please note: The partial display update is intended to be used for extremely memory-constrained systems. Due to the fact that the display update is done in subsequent updates of small areas, moving graphical objects can cause some tearing effects. The UI design should consider this aspect.
Although you can combine the PSoC 62S2 Wi-Fi BT Pioneer Kit (CY8CKIT-062S2-43012) with many different display controllers or your own hardware, we highly recommend to start first with the following hardware components in order to ensure that you get the entire software up and running.
If you want to use the Free edition of Embedded Wizard Studio and the PSoC Platform Package, please register on our website and select the target PSoC-62S2. Then you can download the above software packages.
★Step 4: Unpack the provided Embedded Wizard Build Environment for PSoC-62S2 to your local file system (e.g. C:\PSoC-62S2). Please make sure to use a short working folder path (e.g. C:\PSoC-62S2) since ModusToolbox (Eclipse) has restrictions regarding the file path length.
★Step 5: Connect your development board with your PC via USB (make sure to use the KITPROG3 USB connector J6). Otherwise flashing your software is not possible. Check in Windows device manager, if the KitProg3 USB-UART device is available below Ports (COM & LPT). If KitProg3 USB-UART device is not available, press MODE SELECT button (SW3) and wait until device list changes after some seconds..
The provided Embedded Wizard Build Environment for PSoC 62S2 Wi-Fi BT Pioneer Kit contains everything you need to create, compile, link and flash an Embedded Wizard UI application for the PSoC 62S2 Wi-Fi BT Pioneer Kit in combination with the TFT Display Shield Board (CY8CKIT-028-TFT). After unpacking, you will find the following subdirectories and files:
•\Source - This folder contains the files main.c and ewmain.c. There you will find the initialization of the system and the main loop to drive an Embedded Wizard GUI application. The file ewconfig.h contains general configuration settings for the target system, like memory ranges and display parameter and configuration settings for the Embedded Wizard Graphics Engine and Runtime Environment. Additionally, this folder contains a configuration file for FreeRTOS and the device driver C/H files used for the DeviceIntegration example.
•\Examples - This folder contains a set of demo applications. Each example is stored in a separate folder containing the entire Embedded Wizard UI project. Every project contains the necessary profile settings for the PSoC 62S2 Wi-Fi BT Pioneer Kit. The following samples are provided:
•\PlatformPackage - This folder contains the necessary source codes and/or libraries of the PSoC Platform Package: The Graphics Engine for the color format RGB565 and the Runtime Environment (in the subdirectory \RTE).
•\TargetSpecific - This folder contains all configuration files and platform specific source codes. The different ew_bsp_xxx files implement the bridge between the Embedded Wizard UI application and the underlying board support package (Infineon/Cypress hardware drivers) in order to access the display, the touch driver, serial interface and the clock.
•\Drivers - This folder contains the display driver for the ST7789V that can be used as templates for your own hardware. Feel free to use them and to adapt them according your needs.
★Select the project PSoC-62S2 and open the Library Manager from the Quick Panel. Press the button Update within the Library Manager (all shared mtb components should be downloaded). After all components are downloaded, close the Library Manager..
In order to create your own UI project suitable for the PSoC6 target, you can create a new project and select the PSoC 62S2 Wi-Fi BT Pioneer Kit project template:
As a result you get a new Embedded Wizard project, that contains the necessary Profile attributes suitable for the PSoC 62S2 Wi-Fi BT Pioneer Kit (CY8CKIT-062S2-43012):
★The attribute PlatformPackage should refer to an installed PSoC Platform Package. Please note, that for PSoC6 only the color format RGB565 can be used.
In order to receive error messages or to display simple debug or trace messages from your Embedded Wizard UI application, a serial terminal like "Putty" or "TeraTerm" should be used.
★As soon as you connect your PSoC6 target with the PC via USB, a new virtual Com Port appears within your system device list. Open the device manager to get the port number of this COM port.
The layout of the interface between the PSoC 62S2 Wi-Fi BT Pioneer Kit (CY8CKIT-062S2-43012) and the TFT Display Shield Board (CY8CKIT-028-TFT) can be optimized so that the data lines are not scattered over several GPIO registers. By doing this modification, the performance of the display update can be increased significantly. Instead of setting each GPIO pin individually, the entire GPIO register is set at once.
The following table shows the list of changed connections between the PSoC 62S2 Wi-Fi BT Pioneer Kit (CY8CKIT-062S2-43012) and the TFT Display Shield Board (CY8CKIT-028-TFT):
The following section contains the version history of the Build Environment (including Graphics Engine and Runtime Environment) for the PSoC 62S2 Wi-Fi BT Pioneer Kit. These release notes describe only the platform specific aspects - for all general improvements and enhancements please see the Embedded Wizard release notes.
Crystalfontz has a wide variety of LCD display products. Including ePaper, OLED, TFT and accessories. Watch our LCD videos below to see our display solutions in action.
Not sure how the difference between transflective and transmissive affects sunlight readability? Here is a video that takes you from pitch black to full sunlight, showing how the transflective CFAF480640A-035T compares to a transmissive TFT display module.
In this video, we"re demonstrating driving a 800x480 5" TFT with an Seeeduino (Arduino UNO Clone with 3.3v / 5v switch) and the help of our CFA10100 EVE accelerated board.
Awesome little transparent OLED display. Its a 128x56 pixels and 1.51 inch diagonal. Super-bright, monochrome (light blue). We powered it up with a Seeeduino for this demonstration.
This is a quick video showing our new 1.3 inch TFT LCD. This is a small, full-color TFT. It"s controlled via 4-wire SPI. It has a ST7789H2 controller. This display runs off a single 3.3v supply which controls the logic and backlight.
Ever wonder what will happen if you submerge an OLED display in water? Well we tried it, we also tried coating the components with various sealants to see if we can help protect them in high humidity, or high-water level scenarios.
This is a 2.4" IPS TFT designed for embedded systems. This wide viewing angle IPS display can be used in any orientation--landscape or portrait. The backlight is 850 nits (cd/m2) so it can be used in most lighting conditions.
This is a Capacitive Touch 2.4" IPS TFT designed for embedded systems. This wide viewing angle IPS display can be used in any orientation--landscape or portrait. The backlight is 730 nits (cd/m2) so it can be used in most lighting conditions.
Check out this small, low power transflective LCD display. Available in many options including with and without a backlight, breakout board, or a complete development kit.
Pay once and never worry about it again. Once you buy Visual TFT you are entitled to a lifetime of free upgrades. Upgrading the software takes only a few minutes and a few clicks. We are constantly adding new features, and you can keep track of what is happening on the Software Roadmap page.
The Visual TFT currently supports 17 graphics controllers from leading manufacturers. You can be a part of the process by letting us know what graphics controllers you wish to see supported next, by using our helpdesk and submitting a ticket.
Visual TFT supports a total of 17 TFT controllers and many different display sizes, from 131x131 to 800x600 pixels. The most popular ones are the 320x240 TFT displays running on ILI9341controller. This display is found in many embedded devices worldwide. All MikroElektronika multimedia boards have this display integrated, so you’ll have all the hardware you need to get started. You can also order TFT displays separately from MikroElektronika’s online store.
Visual TFT also supports FTDI chip™ - the latest EVE GUI Platform and FT8x and FT81x families of graphics controllers. These powerful devices allow for sophisticated forms of human-machine interaction and more satisfying user experiences, including video playback. EVE integrates display, audio and touch onto a low cost, easy-to-use, single-chip solution. The EVE family has an object-based structure (where objects can be images, fonts, etc). This offers you an easy way to design more effective GUIs for TFTs, with all the display, audio and touch functionality included. Visual TFT is the first software in the world to provide full support for many of EVE’s powerful features like sound, transparency and anti-aliasing fonts. There are many new components available for GUI design, which are natively supported in the controller itself.
Visual TFT supports all our development and multimedia boards, so you will find all the hardware you could possibly need in one place. Each board has a hardware pattern, a configuration template with hardware connections for TFT and touch screen, and you can do all necessary settings with a single click.
Three major compiler groups are currently supported: mikroC, mikroBasic and mikroPascal for PIC, dsPIC, PIC32, AVR, ARM and FT90x. This means that no matter what compiler you will write your project in, source code generated by Visual TFT Tool will be integrated smoothly.
The Visual TFT Interface is really easy to use, and implements standard intuitive behavior, so you will feel like using any other vector graphic editors. But we have mixed functionalities from both worlds: world of design and world of programming. There are several palettes of most useful components that you can use in your application. Just drag a component onto a pixel grid display screen and it will be drawn instantly. Use Object Inspector to edit component properties and to assign desired events.
Do you need more space for your images and fonts? Do you want to create image slideshows, or to even play a video from MMC/SD Card? With new Resource file feature, Visual TFT software brings you all this and much more. If this option is selected, after code generation, Visual TFT will store all of your images and fonts in the resource file and will optimize them as much as possible for faster utilization. You just have to copy that file onto your MMC/SD card and you are ready to go.
The help file is the best place to start if you want to get to know the Visual TFT software. The easy-to-read format and detailed explanations of every functionality and feature will make you an expert in no time.
Seems interesting UGUI. However for example for the controller ST7586S have any examples of LCD functions to associate with UGUI? If you have made and canst send to me …
Vitor AquinoHi Vitor, sure it is possible to connect UGUI to the ST7586S. I will look for some sample code… Best regards AchimHello! I have recently been drawing Lissajous_curve through the Nios II, can I communicate with you?Email:maruixiang96@gmail.com
Thanks for the extensive library. I see you already used a ST7586S in one of your videos demonstrations. I have a similar display but it draws 2 pixel per byte and not 3 pixel as the datasheet . Can you help me with this ? below is the initialization code i used
Hi! Were you able to get 3 pixels per byte?Hi Andrey, yes! In order to use this feature you have to use a “read – modify – write” pset function which reads data from the display, changes it and writes it back to the display. BR Achim
Hi! I have the same problem with the pixels. Could you show me a example about the use of the "Read Modify Write" function to write 3 pixels per byte?. I did not understand this command on the datasheet. When this command is enabled, is it necessary to do the algorithm on the diagram at page 37 of the datasheet every time when i want write data to the display? Or is it only necessary one time on the initialization process?
I find this library somewhat intriging. Do you have any working Arduino examples, and if it is not asking too much – something for a SSD1322 based display?
Can you provide code for the dsPic33 with the SSD1322 driver? That is the exact setup I am trying to run for a project of mine. I am using the Blue Display. Thank you so much!!!!Hi Mike,
AchimAs we"re already talking Microchip, what would be necessary to get a Pic32MZ2048ECH144 and HX8238-A based display to use µGUI?First of all you have to connect the TFT DPI Interface to the PIC. Then initialize the internal DPI Interface of the PIC. After that you only have to write a Pset-function to use uGUI. Hope this helps! By the way: which hardware platform do you use? BR Achim
I really like the design of your code. I was able to get it up and running on a PSOC5 with no problems on a 128×64 newhaven display in so little time I was surprised!
Have you thought about how to implement screen rotation? I am wondering how to change to portrait from landscape on my display (at compile time, not run time)
I"m also interested in getting a 1.5" OLED SSD1351 running on a Raspberry Pi 2 Model B. In fact, I want to run 3 displays from that Pi (without exhausting the GPIO either–it"ll be running 3 sensors too).
I"ve got a problem with the refresh rate. Some times a flicker line appear on the middle of the screen. The flicker will occurs rarely if I lower the PCLKto 16MHz, but it still appears.
Can I use ugui with STM32F4-Discovery + ssd1963 fsmc module? I have ssd1963 library. I can run the screen but do not know how I could combine seamlessly with ugui. Can you help with this?Hi Mehmet,
Hi there i am after a oled display for a pure evoke flow radio and have been told it is a pmo 19301 and is 2.7" diagonaly my question is do you know where i can buy one of these units.
We are using Tiny6410 stamp module. It is restricted to using only friendlyarm display. We need to interface resistive touchscreen display of 5 inch & 7 inch of our choice. Please give steps how we can use your library.
Nice work! So impressive!I am new to OLED and now working a project using a NHD-3.12-25664UCB2 OLED with PIC, can u give me an pic code example with the SSD1322 driver? Thanks a lot in advance!Hi, have a look at the forum. There is an example Pset function for the SSD1322.
I tried, but I can not force to work my 240×128 display with T6963C controller . Could you please send me the code to this: 240×128 LCD | Driver: T6963C | Interface: 8080
I have a small display with no touchscreen. However I want to use windows with GUI buttons and use up/down buttons (physical buttons) to select GUI buttons on the screen (and use an enter button to simulate pressing a GUI button). Is it possible to do this with ugui, to select GUI buttons and generate GUI button clicks programmatically without toutchscreen?
I"ve set it up on an STM32L100RCT6 with an 128×64 glcd, and everything works like a charm, except the UG_DrawLine() function, which seems to always draw a falling line, no matter how the arguments are arranged