8 years, 11 months ago.

ILI932x display not working?

Trying the demo:

https://developer.mbed.org/users/Geremia/code/UniGraphic_demo/

Using:

ILI932x myLCD(SPI_8, 10000000, D11, D12, D13, D10, D9,"myLCD");

Gives me flashy led indicating SPI port not set correctly? Tried several boards and ports, same result.

Any ideas

Many thanks, Paul

Question relating to:

Basically i glued Peter Drescher and Simon Ford libs in a GraphicsDisplay class, then derived TFT or LCD class (which inherits Protocols class), then the most derived ones (Inits), which … ILI9320, ILI9325, ILI9328, ILI9341, ILI9481, ILI9486, IST3020, LCD, MIPI, parallel, SPI, SSD1306, ST7565, TFT, UC1608, UC1701

1 Answer

8 years, 11 months ago.

Hi, not sure about the meaning of flashy led, do you mean mbed board led? Tryd also old versions of unigraphic and mbed libs? What display have you? Btw, i put only init for ili9325, if you have 9320 or 9328 you have to add your init in file ILI932x.cpp actually the id is checked, if not 9325 it does not init it.

identify(); // will collect tftID
if(tftID==0x9325) init9325();

Maybe put a printf there to see if at least the id works.

If 9327 (usually 240x400 displays), it uses standard cmds, so you can take TFT_MIPI.cpp and add your specific display init cmds

Hi Geremia, I'm using the ILI9320 display. I see in the ILI932x.cpp only has the init9325() is specified, I have added the init code for the ILI9320. That's okay however it does not get this far.

The flashing error led on the dev board is indicating the SPI pin defines are not good so it doesn't get the init part. At least that what I think is happening. I'm using the same SPI pin defines as Frank's set up below that works and is the same as your set up example.

https://developer.mbed.org/users/frankvnk/code/KL25Z_ILI9320_Demo/file/cb2172c95bf1/main.cpp

Any ideas?

Cheers, Paul

posted by Paul Staron 28 Nov 2015

I'm not sure, but at least for Nucleos if something wrong with SPI pins or gpios or whatever you setup globally, you shoudl see a msg on uart at 9600 boud after reset and prior to get into main, give a look. What board did you tried?

posted by Geremia G 28 Nov 2015

Tried KL's and Nucleo F401.

I get this msg: 'pinmap not found for peripheral' on the F401.

Very strange, it does work if I define the same pins (your example defines) for the ILI9341 (SPI_8) and does pc print 'Display ID: 0000DEAD' as expected (I do not have the display connected).

I can't see any difference in the set up between the ILI9341 and ILI932x.

posted by Paul Staron 28 Nov 2015

There seems to be an issue when pinname == NC, by default mbed_assert goe to mbed_die, dont' know why it worked at that time, anyway, can you give a try? i've updated unigraphic lib The difference is ILI932x not using DC pin in spi mode, so in spi_8.h protocol the DC pin has default value NC if not specified.

posted by Geremia G 28 Nov 2015

Yes it is now working. I have added the same init defines from Frank's library for the ILI9320 however the text and graphics are displayed from right to left. Orientation is correct.

posted by Paul Staron 29 Nov 2015

Good. Now i suppose your controller has inverted wiring than mine, you could try to copypaste the set_orientation(int o) found in TFT932x.cpp and add a modified one in your init.cpp. You can see i noted the x plotting direction as S1 - S720, modify/swap them, maybe it's enought.

posted by Geremia G 29 Nov 2015

Swapping these reg_write(0x0001,0x0000) round in the TFT392x.cpp file has fixed it. Problem is how can this be incorporated without upsetting the 9325 assuming the 9325 does work correctly here (I don't have one to test). Perhaps if/def's

posted by Paul Staron 29 Nov 2015

Nice. Maybe a global flippedXY to be set in init and parsed in the set_orientantion. I'll do something like that later.

posted by Geremia G 29 Nov 2015

I've added ili9320 init, same as frank lib, added a flipped=FLIP_X at begin of init, can you give a try?

posted by Geremia G 29 Nov 2015

That's working Geremia. I forgot to mention just to complicate things the SPI format is _spi.format(8,3); for this display otherwise no response.

Perhaps we need something like:

ILI932x myLCD(SPI_8_3, 10000000, D11, D12, D13, D10, NC,"myLCD");

With conditional in the SPI8.ccp file?

Something else for another day, BurstSPI considerably increases the write speed with these SPI displays, its worth adding.

posted by Paul Staron 30 Nov 2015

Weird it does not like spi format 0. Yes, burstspi would be nice to add, anyway i suggest to always use SPI_16 instead of SPI_8, it's slightly faster.

posted by Geremia G 30 Nov 2015