ILI9341 Read ID not working

Comments

2 comments

  • Michael_L

    Can you confirm the full part number of the display you are referring to?
    We used to sell 2.4" TFTs with the ILI9341 controller, however they used a 8/16 bit parallel interface.
    The serial interface read cycle sequence information begins on page 36 of the ILI9341 datasheet:
    https://newhavendisplay.com/content/app_notes/ILI9341.pdf
    I would ultimately use this document to read from the IC correctly, as you may encounter incorrect examples online.

    0
  • thamilton533

    I am also having this issue. I am using the NHD‐2.4‐240320SF‐CTXL#‐FTN1 with an STM32F407 micro, 16-bit parallel bus.

    I have no trouble using the display. I need to be able to read the ID because now that the NHD‐2.4‐240320SF‐CTXL#‐FTN1 is obsolete i have to use the NHD‐2.4‐240320CF‐CTXL#‐FT which uses a different display driver. I want to be able to write my code so that I can detect which display i am using and then setup either up accordingly.

    Below is the code I wrote to read the display ID.

    /*********************************************************************
    *
    *       LCD_X_ReadDisplayID
    *
    * Purpose:
    *   Read LCD Display ID
    */
    unsigned long LCD_X_ReadDisplayID(void) {
       unsigned long rtn_status = 0;
       U16 tmp;
       
       LCD_X_Write0_16(0x04);
       osDelay(20);
       tmp = LCD_X_Read1_16();   //Dummy read for 1st Parameter, don't cares
       
       osDelay(20);
       tmp = LCD_X_Read1_16();
       rtn_status |=  (0x00FF & tmp);
       rtn_status <<= 8;
       
       osDelay(20);
       tmp = LCD_X_Read1_16();
       rtn_status |=  (0x00FF & tmp);
       rtn_status <<= 8;
       
       osDelay(20);
       tmp = LCD_X_Read1_16();
       rtn_status |=  (0x00FF & tmp);
       rtn_status <<= 8;
       
       return rtn_status;
    }
    0

Please sign in to leave a comment.