Go Down

Topic: Graphics library for cheap KMR-1.8 SPI (S6D02A1 and ILI9163) TFT displays (Read 35140 times) previous topic - next topic

slessard

Hello Bodmer,

Yes it was a typo. I use the SCL pin on the TFT side, wired to the SCK on the Mega side. Thanks for pointing out.

David, I tried with library for ST7735S and S6D02A1.
A got at least some basic responding with the ST7735S (I looped over the function InvertDisplay every second and I saw the screen flashing at same frequency. I'm not sure it was actually inverting but it did something).
The call to fill with a solid color didn't filled the entire screen but about 2/3 with some large areas in the middle being unaffected by the command (tried on two different parts).
I got no result with the driver from Samsung so unless drivers have similar command register or I got lucky and the InvertDisplay function was recognized by my display even if I was using the wrong library, I guess that mine is ST7735S.
I can still try with the libs for ILI9163C just in case!

Thanks,
Simon

slessard

Hello bodmer,

Thanks for the script! Pretty effective... I just ran it and here is the output :

Code: [Select]
TFT driver register values:
===========================
Register 0x01: 0x00
Register 0x04: 0x548066
Register 0x09: 0x610000
Register 0x0A: 0x08
Register 0x0B: 0x00
Register 0x0C: 0x06
Register 0x0D: 0x00
Register 0x0E: 0x00
Register 0x0F: 0x00
Register 0x2E: 0x482020
Register 0xDA: 0x54
Register 0xDB: 0x80
Register 0xDC: 0x66
===========================

Looks like driver chip is: ILI9163 (based on datasheet ID)


The one I haven't tried yet, so there is hope!
I also went back to the description of the TFT part I bought and it says ST7735... we always have surprises with these products from China!
I will try your lib and give you some news.

Thanks again!


bodmer

@slessard

OK, it looks like you have an ILI9163 based display then.  The results indicate you have got the connections right.

You will need a resistor divider on the logic lines with that driver to avoid brightness modulation (happens when the display is being updated), I use 1k2 and 2k2 as I have lots of those values. Power the display from 5V, I notice that my display is fitted with a 3.0V regulator.

I intend to make a minor tweak to the library later today to add a "belt and braces" software reset at the start of initialisation.

bodmer

I tested another display that I thought had a S6D02A1 and this does indeed seem to be the case as it only works with the TFT_S6D02A1 library and no others.  Whereas the ILI9163 based display works fine with either the TFT_ILI9163 or the S6D02A1 library!

PS The TFT_ILI9163 library has been updated to add a software reset at the start of initialisation. This will help in cases where a display does not have a hardware reset pin.

slessard

It's starting to give some results!
Apparently my TFT that was identified to be built with driver ST7735 by the vendor was finally made from ILI9163...
Although it is not perfect, I have a good start see attached.
The background is weird and the two bright stripes we can see is like those I got when I was using the library for the ST7735 but at this time it was two solid color areas, not pixelized like that and obviously without the text.


bodmer

@slessard

That looks like the random startup state of the graphics RAM that is inside the display chip.

In setup() or somewhere else in your sketch, after tft.init(), you must clear the screen to the desired background colour, say with:

Code: [Select]
tft.fillScreen(TFT_BLACK);


medina

@slessard

OK, it looks like you have an ILI9163 based display then.  The results indicate you have got the connections right.

You will need a resistor divider on the logic lines with that driver to avoid brightness modulation (happens when the display is being updated), I use 1k2 and 2k2 as I have lots of those values. Power the display from 5V, I notice that my display is fitted with a 3.0V regulator.

I intend to make a minor tweak to the library later today to add a "belt and braces" software reset at the start of initialisation.
Bodmer GOOD PLACE IS NECESSARY FOR THE DRIVER ST7735 RESISTENCIAS?

bodmer

For 5V Arduino's a 1K2 series resistor can be used to interface with a ST7735 driver.

Example connections at the end of step 1 here.

dad5019

bodmer;

My ST7735 TFT is working like a champ.  You sir are a genius among geniuses.

bodmer

@dad5019

Thanks for the feedback. Good luck with your project!

suculent

What's the reason this does not work on ESP8266-based MCUs? Regardless the speed, should I use the Adafruit ST7735 lib? Does it support I2C?

bodmer

It is optimised for the AVR processors and uses machine coded sections to improve rendering speeds. This makes it 3 to 12 times faster depending on the graphics functions used.

If you wish to usse the display with an ESP8266 then you could try this library.  It is optimised for the ESP8266.


kacitran

This is the information dump
Code: [Select]
Looks like driver chip is: Unknown                                                                                          
`Hú5BþÿTFT driver register values:
===========================
Register 0x01: 0x00
Register 0x04: 0xE38835
Register 0x09: 0x610000
Register 0x0A: 0x08
Register 0x0B: 0x00
Register 0x0C: 0x06
Register 0x0D: 0x00
Register 0x0E: 0x00
Register 0x0F: 0x00
Register 0x2E: 0xFFFFFF
Register 0xDA: 0xE3
Register 0xDB: 0x88
Register 0xDC: 0x35
===========================

Looks like driver chip is: Unknown







Can help me identify


bodmer

Can help me identify

I do not recognize the returned codes. Post pictures of your display, that may help (You seem to have copied my pictures from the original thread)!

You could just try different libraries and see which one works. The test results show you have got the connections working.

kacitran

These are my photos




LCD is a surprise, but the circuit board is the same



thanks for your reply

Go Up