Author Topic: ILI9341 Read ID not working  (Read 4066 times)

arjunhary

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
ILI9341 Read ID not working
« on: October 08, 2015, 10:45:40 PM »
Hi,

I am using the piTFT which uses the ilI9341 controller with the raspberry pi. I am able to load images and send all commands to the controller and have it working but I am not able to read anything back from the controller including the ID. I am using 4 wire spi including the D/C command. I see different sequences all over the internet. Couple of them include

1) Sending 0x04 command to read ID and then sending 0xFF byte to read every byte
2) Send D9 command with 0x10+ index of byte to read and then sending the 0x04 command.

Both of the above sequences did  not work. Are they correct?

2) When i just the send the 0x04 command without anything, the program hangs waiting for data from RX FIFO

Any help would be high appreciated.

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: ILI9341 Read ID not working
« Reply #1 on: October 09, 2015, 10:01:35 AM »
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:
http://www.newhavendisplay.com/app_notes/ILI9341.pdf
I would ultimately use this document to read from the IC correctly, as you may encounter incorrect examples online.
« Last Edit: October 09, 2015, 10:11:57 AM by Michael_L »

thamilton533

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: ILI9341 Read ID not working
« Reply #2 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;
}

 

Working on NHD‐2.4‐240320SF‐CTXL#‐FTN1, have problem in initialization

Started by sli25Board TFTs

Replies: 6
Views: 3806
Last post June 04, 2015, 09:52:25 PM
by sli25
Arduino LCD library not working with newhaven display NHD‐0420H1Z‐FL‐GWB-3V3

Started by c2hollowBoard Character LCDs

Replies: 15
Views: 8874
Last post November 23, 2017, 11:26:33 PM
by tolikkk
NHD‐1.5‐128128UGC3 some commands not working

Started by lordavonBoard OLEDs

Replies: 4
Views: 2295
Last post January 07, 2016, 10:58:36 PM
by lordavon
MOVED: working with nhd-7.0-800480ef-asxv-t with buildroot framebuffer

Started by Saurabh_BBoard Graphic LCDs

Replies: 0
Views: 47
Last post November 16, 2017, 08:14:59 AM
by Saurabh_B
working with nhd-7.0-800480ef-asxv-t with buildroot framebuffer

Started by mnylund05Board TFTs

Replies: 2
Views: 65
Last post November 17, 2017, 08:40:34 AM
by mnylund05