{{announcement.body}}
{{announcement.title}}

Adding a Rocktech Capacitive Touch LCD to the NXP i.MX RT1052 EVK

DZone 's Guide to

Adding a Rocktech Capacitive Touch LCD to the NXP i.MX RT1052 EVK

Want to learn how to add the Rocktech Capacitive Touch LCD to your board? Check out this tutorial to learn how with the NXP i.MX RT1052 EVK.

· IoT Zone ·
Free Resource

It is never too early to start thinking about Halloween projects!

rended Eyes with i.MX RT

rendered Eyes with i.MX RT

Originally, when I order the MIMXRT1050-EVK from Mouser, it was without the LCD display (see “MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor." I ordered the LCD for the board soon after writing that article, but I was too busy with the university lectures and exams to get a hand on it. Finally, I have spent a few hours at night and I proudly can say — the display is working

Be aware that I’m using the (older/original) EVK board, and a newer EVKB board which seems to be different. I have ordered the EVKB now to check if things are still the same or not.

Hardware and Software Tools

I realize that for i.MX there are lots of board variations, which can impact things how they work. So, here is what I have used in this article:

MIMXRT1050-EVK SCH-29538 REV A3, 7000-29538 REV A (same as in MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor) with external 5V power supply and the following jumper settings:MIMXRT1050-EVK

MIMXRT1050-EVK (click to enlarge)

MCUXpresso IDE 10.2.0 build 759 [2018-05-15] with Windows 10MCUXpresso IDE V10.2.0 Build

MCUXpresso IDE V10.2.0 Build

MCUXpresso SDK SDK_2.x_EVKB-IMXRT1050 SDK version 2.4.0, Manifest Version 3.3.0. I faced strange problems with using an older SDK. Using the 2.4.0 version seemed to solve these problems.SDK EVKB-IMXRT1050 v2.4.0

SDK EVKB-IMXRT1050 v2.4.0

  • external Segger J-Link (J-Link Plus, J-Link EDU, J-Link EDU Mini):
    SEGGER J-Link GDB Server V6.32h Command Line Version
    JLinkARM.dll V6.32h (DLL compiled Jul 5 2018 18:11:19)
  • external P&E Universal Multilink Version 3.5.6.201805161649:Installed P&E Plugin Versions

    Installed P and E Plugin Versions

    external LPC-Link2 with CMSIS-DAP V5.183LPC-Link2

    LPC-Link2

  • I have not used the onboard OpenSDA circuit as that one did not work in a reliable way and was very slow for me.
  • Possible Problems and Troubleshooting

    • Make sure you have the latest SDK
    • I have found powering the board with the OpenSDA/USB is causing subtle issues — always use an external 5V Power supply.
    • The Vsense Voltage sense pin on the SWD connector somehow shows erratic behavior, which is probably related to poor board power supply circuit. Several P and E Universal Multilinks were not able to detect the target voltage (some just did) (orange LED was not on), which caused lots of issues.
    • Power-on of the board, in general, seems very problematic: it worked best for me with a) power on the board and then b) power on the debug probe.
    • The LCD circuit/grounding seems to be causing some high voltage on the frame. Do not touch the metal LCD frame or ground it.
    • If the Segger J-Link debug connection terminates right after starting it, disable the FreeRTOS Kernel Awareness (if it is turned on).
    • Check other troubleshooting tips, like Troubleshooting Tips: Failed Debugging with GDB
    • I have found that, in case of problems, using the HelloWorld_Xip project on GitHub seems to ‘heal’ the board somehow.
    • The i.MX RT microcontroller can easily go haywire. Try to power up the board first and then load the HelloWorld_Xip project. If this fails, erase the external flash using the steps described in MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor.

    LCD

    I ordered the LCD (Rocktech Display Limited, RK043FN02H-CT) from Mouser (Part number 771-RK043FN02H-CT). It is a capacitive touch LCD with a resolution of 480×272 pixels.

    Rocktech Display RK043FN02H-CT

    Rocktech Display RK043FN02H-CT (Source: Rocktech Datasheet)

    Display Connectors

    I have seen and used many display connectors. Connecting the LCD to the board is not easy. It is very difficult and fragile, mainly because the display and cables are always in conflict, and the board has to be held in position. It took me lots of trial and error to get a reliable connection, so I hope the steps below help you get it done too. Best if you have one person holding the board, one person holding the display and a third person inserting the cables.

    There are two connectors on the backside of the board:

    Display Connectors on i.MX RT1052 EVK

    Display Connectors on i.MX RT1052 EVK

    First, carefully pull the black ‘lock’ from the larger connector (red arrows) and then insert the big cable. Make sure that the cable is really inserted to the end of the connector.

    Pull-Push Connector

    Pull-Push Connector

    Then, push the black ‘lock’ into the connector. Make sure the cable is really secured and inside the connector, otherwise repeat.

    Secured connector

    Secured connector

    Next, carefully do the same with the other (touch) cable and connector:

    Inserting Touch Connector

    Inserting Touch Connector

    The golden contacts of the cable need to be inside the connector, then the connector again with the black ‘lock.’ Verify that the connection is tight.

    inserted touch connector

    inserted touch connector

    To avoid the display to touch the board, I have added bumpers to the board:

    Display Connected

    Display Connected

    Carefully place the display on the board. Make sure you are not bending the cables too much or that the board touches the LCD.

    Display on i.MX RT board

    Display on i.MX RT board

    Now, it is a good time to verify that the display is working:

    Display is working

    Display is working

    I used the driver_examples\elcdif project from the SDK_2.x_EVKB-IMXRT1050:

    elcdif project in SDK

    elcdif project in SDK

    The remaining problem is that the display is not secured or attached to the baseboard. One way would be to use double-sided tape or something similar. Instead, I have laser-cut quickly a display frame:

    Two 4 mm plywood sheets and one 2 mm PMMA build the display frame:

    Frame Detail

    Frame Detail

    The .svg/laser cut files can be found on GitHub (see Links section at the end of this article).

    Display with Frame

    Display with Frame

    To test the i.MR plus LCD performance, I have ported the Adafruit ‘uncanny eyes’ application to the i.MX RT1050, using the MCUXpresso IDE:

    Eclipse Uncanny Eye LCD Project

    Eclipse Uncanny Eye LCD Project

    The eyes get rendered at runtime and are using FreeRTOS. With 64MByte external flash, there is plenty of space to cramp in multiple eye versions. The eyes are rendered in realtime with double buffers and using static images loaded from FLASH memory.

    Human:

    rended Eyes with i.MX RT

    rendered Eyes with i.MX RT

    Dragon:

    Dragon Eyes

    Dragon Eyes

    Goat:

    Goat Eyes

    Goat Eyes

    no-sclera:

    no sclera eyes

    no sclera eyes

    newt:

    newt eyes

    newt eyes

    The video below shows them in action:


    Summary

    Mounting the LCD has been a challenge, and I had to create a laser-cut LCD frame to keep it in place. The display is working fine now, and can continue to think about Halloween projects

    Happy Displaying!

    Links

    Topics:
    iot ,mcuxpresso ,sdk ,rocktech capacitive touch lcd ,nxp i.mx rt1052 evk ,tutorial

    Published at DZone with permission of

    Opinions expressed by DZone contributors are their own.

    {{ parent.title || parent.header.title}}

    {{ parent.tldr }}

    {{ parent.urlSource.name }}