cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with writing code for tft lcds

Arman Ilmak
Senior
Posted on March 04, 2018 at 21:11

Hello, guys.I'm trying to get started with a TFT LCD.4.7 with the ILI9487 driver.And I have some problems.

First of all, a couldn't find any library for the driver I have.

Next is that I can't find any resources that explain how can I write my own library,

And the last is that there are some libraries that support other drivers like SSD1968 drivers, what's the difference between these drivers and libraries?Can I use for example SSD 1968 libraries instead of my own LCD driver?

12 REPLIES 12
Posted on March 04, 2018 at 21:55

What is the geometry of the display?

What are you connecting it too?

How are you connecting it?

What is the part number of the display?

What materials has the vendor of the display provided?

There is documentation for the ILI9486 and ILI9488, this is likely quite similar

STM32Cube\Repository\STM32Cube_FW_F2_V1.7.0\Drivers\BSP\Components\ili9320

STM32Cube\Repository\STM32Cube_FW_F4_V1.18.0\Drivers\BSP\Components\ili9341

Review the manuals or example to understand the difference between the chips, and the similarities in the implementations.

>>Next is that I can't find any resources that explain how can I write my own library

In the same manner that many people don't need manuals or explanations about how to drive and work on different types of cars, you'll find that there is a lot of commonality in the function, mechanics and end-goals of chips designed to drive LCD displays and provide frame buffering and drawing,etc.

This doesn't mean things are entirely interchangeable, but that with some baseline knowledge you should be able to work things out.

Find out what other resources are available, and port them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 05, 2018 at 17:24

0690X00000604LwQAI.jpg0690X00000604RUQAY.jpg

These are some of the LCD descriptions that I have.I'm going to write the code with stm32f217zg.

Posted on March 05, 2018 at 17:51

So and 8-bit FSMC interface to the controller via a 30-pin header

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 05, 2018 at 21:21

Bad news,i haven't ever work with FSMC.Does it have any pins on the tft?

And i found another tft library that is a little diffrent in some pins.Can i port its library?

0690X00000604RZQAY.jpg
Posted on March 05, 2018 at 21:40

Ok, and that looks to have a 16-bit wide bus.

The FSMC is the external memory interface of the STM32, much like the address/data buses of early generation micro-controllers, and decoded within the STM32 address space.

The questions I asked earlier will be true of other displays you find, pictures while interesting don't really go far toward actual documentation for boards and chips.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 06, 2018 at 10:49

>Bad news,i haven't ever work with FSMC.

Do not use FSMC at the beginning.

A driver for any TFT controller should contain these elementary functions:

&sharpdefines of all available commands and static TFT parameters

write_command(byte);

write_data(byte);

init_tft_controller(void);

set_pixel(colour, x, y);

Ignore at first the read functionality, a TFT is a data sink.

Create the waveforms in the datasheet for the TFT controller by toggling GPIOs and verfy them with a logic analyzer.

I can not find a ILITEK ILI9487 or an Solomon Systech SSD1968 on ther HP or any kind of datasheet in the www.

Posted on March 06, 2018 at 13:59

You're right.I couldn't find the datasheet either, and this is my biggest problem.

Posted on March 06, 2018 at 16:48

The SSD1968 Spec is here :-

https://www.crystalfontz.com/controllers/SolomonSystech/SSD1963/

 
Posted on March 06, 2018 at 16:56

What are the spec for the screen? This is a technical venue, try to convey usable details, and cites for the specific product you have in your hands.

The ILI9488 is likely a good proxy

https://www.elecrow.com/download/ILI9488%20Data%20Sheet_100.pdf

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..