320x240 controller differences ST7789S and ILI9341 [Solved]

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have been used LCD displays from newheaven that use ILI9341, but now they only produce with ST7789S, I just got samples, and they show a picture with my orginal FW, but I have one main problem 

the X and Y are flipped, so my picture are turned 90 deg, are there anyone that can tell which register(command number) that I need to change?

 

An other small problem is that blue and red are flipped, but I also had that when I wrote the original FW, so I guess I can find that.

 

 

This topic has a solution.
Last Edited: Mon. Jun 22, 2015 - 02:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An other small problem is that blue and red are flipped

Presumably a RGB vs BGR bit?

 

...quick look at data...

 

Seems to be bit 3 of "MADCTL".

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok solved:

It was correct the RGB bit solved the color problem.

and the direction was the MV bit, but it ended upside down, so the MX bit had to be flipped.(because of the changed MV MX control Y :) )

So all solved by writing 0xE0 instead of 0x88 to MADCTL.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Mr Sparrow2

 

I've been all day trying to program ST7789S with the ATMEL libraries but it does not work. Which library did you use??

 

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I 100% wrote my own.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have an Arduino,  my MCUFRIEND_kbv library supports the ST7789V.  You can download it from  http://forum.arduino.cc/index.php?topic=366304.msg2524865#msg2524865

 

From memory,  this controller is much like any modern TFT controller.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow sparrow2 that is a great achievement!!!

 

We have to change this ILI9341 driver to the ST7789S driver because the NHD-2.4 240320SF-CTXI are out of stock in a coule of websites and I think  they are not going to make more

 

We are using a Cortex M3 microcontroller. It is the ATSAM3S2CA, it is an ATMEL too, Ill take a look to the arduino's library!! 

 

Thanks you both!! :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just change the initialisation sequence.
The readGRAM is 565 when the ILI9341 is 888.
Otherwise, all the standard TFT operations are identical.
Typed from memory.
David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And I had to change the orientation of the display.(it's a bit in the same reg.)

 

I use a mega324 and the only thing I had to make was some bargrafs (with changing colours), some Icons and 2 different fonts (25x32  (true type) in size, I made a program that could make the table from a PC font). I think that the total code size are about 12k where most are fonts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From the ST7789V data sheet:

9.2.8 LCMCTRL (C0h): LCM Control

You can set the panel characteristics.  e.g. the MX behaviour with XMX.

 

From the ILI9341 data sheet:

8.3.28. Interface Control (F6h)

You can set the panel characteristics.  e.g. the MX behaviour with MX_EOR.

 

Unfortunately,  most cheap Ebay Serial displays have EXTC=0.   So the extended commands are not available.

 

Untested.  I have not looked at the ST7789S data sheet.

 

David.