Sony's Developer World forum

    • Search
    • Home
    • Forum guidelines

    How to do connect a LCD with the SPRESENSE?

    Spresense
    2
    7
    2816
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • vivekbhadra
      vivekbhadra last edited by

      Hi All,

      I am trying to display a video on the LCD screen using SPRESENSE, and possibly using the camera app. To avoid reinventing the wheel, I tent to ask the following questions before diving into the spresense/nuttxkernel code etc:

      Is there a connection diagram to easily connect the LCD with the SPRESENSE? I know the display device will vary from one to another but I am looking for ili9340 and lpm013m091 based displays. A simple connection diagram would help a lot.

      How to enable the driver support for the LCD in the nuttx kernel? What is the main config parameter for the LCD?

      Do I need any changes in the camera app to get the video going?

      I am attaching the lcd display I have got here, just a s a reference.

      Any help would be highly appreciated.

      Thanks and regards,
      Vivek

      LCD.jpg

      1 Reply Last reply Reply Quote
      • TE-KarlKomierowski
        TE-KarlKomierowski DeveloperWorld last edited by TE-KarlKomierowski

        Hi @vivekbhadra

        After a quick search I found your display: tft-320x240px-mi0283qt-9a-v1.3-datasheet.pdf
        And I think you're lucky since if you look at the data sheet, you can see that they have been nice enough to expose the IM0-3 on the break-out board.
        On page 11 you can see that if you connect the IM[ x] pins correct you will be able to configure the display to run in SPI, 8 bit mode which is the preferred way.

        Here is one schematic on how to connect a ILI9340 display to the Spresense main board:
        https://hackster.imgix.net/uploads/attachments/805919/asset_14_nbycdVt8Gd.png?auto=compress%2Cformat&w=740&h=555&fit=max

        In the Spresense SDK you will find drivers for the ILI9340 display and also where it is connected, to main board or extension board.
        The following example shows camera image on a display:

                                                                                    [*] Camera example                                                                                                                                  
                                                                                     (100) Camera task priority (NEW)                                                                                                                   
                                                                                     (2048) Camera stack size (NEW)                                                                                                                     
                                                                                     [*]   Output LCD 
        
        

        This should be enough to get you going for a while.
        Good luck!

        BR
        Karl

        vivekbhadra 1 Reply Last reply Reply Quote
        • vivekbhadra
          vivekbhadra @TE-KarlKomierowski last edited by

          Thanks a lot @TE-KarlKomierowski for the help as usual. I will soon start on that and update how that goes. Cheers

          1 Reply Last reply Reply Quote
          • vivekbhadra
            vivekbhadra last edited by vivekbhadra

            Just so that it may help someone in future, I configured the camera app with the below to command for using with the lcd:

            tools/config.py board/spresense device/lcd examples/camera
            

            plus the above menuconfig mentioned by Karl.

            1 Reply Last reply Reply Quote
            • vivekbhadra
              vivekbhadra last edited by

              I have hit one more issue here. I am trying to make the video camera app to be independently running on power rather than being invoked from the nsh console. So I made changes in the nuttx/.config as below:

              CONFIG_USER_ENTRYPOINT="sdk_entry"
              changed to
              CONFIG_USER_ENTRYPOINT="camera_main"

              I knew one issue which is in independent app mode the sd card is not detected if I do not put a delay after initializing the hardware. This fix works.

              But I just realized in the independent camera mode the lcd hw is not getting initialized, has anyone seen this issue before?

              Thanks and regards,
              Vivek

              TE-KarlKomierowski 1 Reply Last reply Reply Quote
              • TE-KarlKomierowski
                TE-KarlKomierowski DeveloperWorld @vivekbhadra last edited by

                Hi @vivekbhadra

                You probably have to add this lines of code to camera_main do the proper initialization first:

                (void)boardctl(BOARDIOC_INIT, 0);
                

                @vivekbhadra said in How to do connect a LCD with the SPRESENSE?:

                I have hit one more issue here. I am trying to make the video camera app to be independently running on power rather than being invoked from the nsh console. So I made changes in the nuttx/.config as below:

                CONFIG_USER_ENTRYPOINT="sdk_entry"
                changed to
                CONFIG_USER_ENTRYPOINT="camera_main"

                I knew one issue which is in independent app mode the sd card is not detected if I do not put a delay after initializing the hardware. This fix works.

                But I just realized in the independent camera mode the lcd hw is not getting initialized, has anyone seen this issue before?

                Thanks and regards,
                Vivek

                1 Reply Last reply Reply Quote
                • vivekbhadra
                  vivekbhadra last edited by

                  Hi @TE-KarlKomierowski thank for the reply. Yes that's the bit I missed. It's working now.

                  1 Reply Last reply Reply Quote
                  • First post
                    Last post
                  Developer World
                  Copyright © 2021 Sony Group Corporation. All rights reserved.
                  • Contact us
                  • Cookies
                  • Legal