Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - thamilton533

Pages: [1]
1
TFTs / Re: ILI9341 Read ID not working
« on: January 11, 2016, 07:38:37 AM »
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;
}

Pages: [1]