Questions? Call us: +1 760-918-6722

Urgent : DT028ATFT - 4-wire SPI communication problem

Hi,
I try to use DT028ATFT display via 4 wire SPI interface (IM[3:0] = 1110) but I have some strange troubles.
1- When I write simple command (sleep out/in, display on/off, display inversion on/off, ...), I see that display change appearance (inversion on/off for example) and the reading of the display status (0x09h) gives the nice status. But when the reading of others registers (display identification information, ID1, ID2, ID3, ID4, ...) returns always null data. I think that the readings of 32-bit, 16-bit or 8-bit data haven't not the same protocol. I think I use correctly the D/CX pin because I can read the display status, but I don't understand why I can't read ID4 for example. Can you confirm that "0x00 0x93 0x41" data are available when read ID4 ? Can you give me some diagram ?
2- To test my writing function, I would like to write in display brightness (51h) and read back (52h). But when I write (51h) a brightness value, the display doesn't change appearance and a reading always returns 0. I think my writing function (cmd+data8) is wrong !!! I saw the write sequence cycle in datasheet but not clear for me (what is TB in 4-line serial interface protocol diagram page 35 for example). Can you give me clear protocol or screen shot ?
3- I want use the DT028ATFT display with 3.3V power supply, but I don't understand initialisation of voltage registers C0h, C1h, C5h, C7h. Can you give me a standard initialisation ?

Best regards
Eric LOUVEL

Replies

engineering_seacomp's picture
engineering_seacomp
September 9, 2020

Hi,

 

Have you seen all of the guidance on the display in the Design Center? https://www.displaytech-us.com/design-center

https://www.screencast.com/t/sqYAJxCDPBxn  which includes display sample code, how to read / write registers etc?

Also, you cannot change the brightness through the ILI9341 registers.  Instead, to do this in software you PWM the LED K/A, or use a fixed value for the current limiting resistor.

Thanks

 

Eric's picture
Eric
September 10, 2020

Hi,

Thank for your response.

Yes, I know the design-center. Sorry, but the link screencast is broken. Can you send me back the link ?

Can you confirm that the DT028ATFT can be use with 4-wire SPI interface ? Because I read that the DT028ATFT is hard coded 9-bit SPI interface. If true, is it the case for DT028BTFT and DT028CTFT ?

Best regards

Eric

engineering_seacomp's picture
engineering_seacomp
September 10, 2020

Hi,

I can confirm that 4-Wire SPI works fine according to the datasheet clocking in section 7.6.2

https://cdn.displaytech-us.com/sites/default/files/driver-ic-data-sheet/Ilitek-ILI9341.pdf

Did you see the design center document on SPI.  It's for a different display that uses the same ILI9341, so very applicable, at least for registers to read, and values returned.

https://cdn.displaytech-us.com/sites/default/files/resources/Displaytech-Support-8-bit-MCU-ILI9341.pdf

Eric's picture
Eric
September 10, 2020

Hi,

Thank for your response. But sorry, it's not clear.

Yes, I have seen the design center on SPI. Your pdf is the 8-bit-MCU-ILI9341 not the 4-wire SPI ILI9341. Do you have this kind of document for 4-wire SPI design, please ? or a clear diagram ?

Yes, I saw the diagram in the section 7.6.2 for "Read data through 4-line SPI mode" (Memory Read 2Eh) but I don't find the write section (Memory write 2Ch). Please, which section ?

My problem is : I don't know if I'm wrong on reading or writing function (may be both). I can't read the ID4 (24-bit) but I can read the RDDST (32-bit). I need clear diagram for 4-wire SPI interface for read/write 8-bit, 16-bit, 24-bit and 32-bit.

I think the insertion of dummy clock cycle (one or 8 depend case) is a problem in my protocol implementation. I don't understand why I can't read the RDDST without dummy clock insertion. Is it a particular case ?

Thank for your help

Best regards

Eric

 

 

 

engineering_seacomp's picture
engineering_seacomp
September 14, 2020

Hi Eric,

I wanted to make sure you are aware the the DT028ATFT is not recommended for new designs.  However the DT028BTFT is the replacement, and still uses the ILI9341.

https://www.displaytech-us.com/2-8-inch-tft

For 4-line Serial Interface, See ILI9341 datasheet sections 7.1.8-7.1.10, 7.6.2 and 19.3.4

Here are the proper connects (as an example) for the different interfaces:

https://www.dropbox.com/s/ftmfw5jmmbukwp7/Display%20to%20MCU%20Connections%20-%20DT028ATFT.pdf?dl=0

Did you start with the example registers in the document (8 bit) for read and write?  It gives values you should expect.

 

Eric's picture
Eric
September 14, 2020

Hi,

Thank for your response.

Q1) Is DT028BTFT pin-to-pin compatible with DT028ATFT ?

I know the ILI9341 datasheet section.

I use 4-wire SPI interface. I'm sure that the hardware is nice connected because I read the Read Display Status (RDDST@09h - 32-bit) and write Display inversion on/off (@20h/@21h - 8-bit). For example, when I toggle write Display inversion on/off, I see that the screen changes appearance and the RDDST is updated accordingly. It nice. It's ok.

BUT I CAN'T READ THE ID4 (fixed value 009341 at @D3h - 24-bit) AND I CAN'T MEMORY READ/WRITE (@2Eh/@2Ch). I don't understand why. I need clear diagram for 4-wire SPI interface for read/write 8-bit, 16-bit, 24-bit and 32-bit.

Q2) Do you have 4-wire SPI interface scope screen-shot or other technical document, please ?

Q3) Is dummy clock necessary to read ID4 ? (because I read RDDST without)

Please, give me answer to Q2 and Q3 without datasheet section but new document or new technical data.

Best regards

Eric

engineering_seacomp's picture
engineering_seacomp
September 14, 2020

Hi Eric,

I'm sorry you are still having trouble.

Q1) Yes, DT028BTFT pin-to-pin compatible with DT028ATFT 

 

Q2) The clear diagrams are on Pages 38 of 240 and page 39 of 240 of the datasheet.  I do not have a scope grab.

https://cdn.displaytech-us.com/sites/default/files/driver-ic-data-sheet/Ilitek-ILI9341.pdf

Shown for 8, 24, and 32 bit reads.  Yes, dummy reads are required, without understanding why, except specified by IC manufacture.

I did see notice in Note 2, (page 87 of 240): B0 to D9 and DE to FF are for factory use of display supplier. USER can decide if these commands are available or they are treated as NOP (00h) commands before shipping to USER. Default value is NOP (00h).

For Memory Write (0x2c), did you look at the ILI9341.c code, specifically PutPixel(), provided in the example?  Setting up column, etc?

https://cdn.displaytech-us.com/sites/default/files/resources/Displaytech-Support-8-bit-MCU-ILI9341.pdf

Q3)

Take the approach of getting the register you want working, instead of looking for a generic response of "I can get all registers to work", because in my expereince, sometimes the 240 page document is not 100% accurate.

I know you are choosing ID4 because it seems simple, but stick with the known registers, like we provided in the document for MADCTL.

Eric's picture
Eric
September 15, 2020

Hi,

Thank for yor response.

Which datasheet section, can I found the clear diagrams 4-wire Serial Interface Protocol for 8, 24, and 32 bit write ?

Best regards

Eric

engineering_seacomp's picture
engineering_seacomp
Eric's picture
Eric
September 15, 2020

Hi,

I need clear diagram for 8, 24 and 32-bit write NOT for 8, 24 and 32-bit read (as mentioned page 38 and 39 of datasheet).

I saw your document but it's clear diagram for a reading.

For example, I need to write in Pixel format set register (0x3A).

Best regards

Eric