Page 2 of 2

Re: spi driver for lcd interfacing

Posted: Mon Dec 19, 2016 10:34 am
by ESP_nilay
sermus wrote:
ESP_nilay wrote:Here's a driver & example code for ILI9341 using the adafruit library.
Nice to see my code is in demand. Sad to see the credits are lost.
Sorry to miss that. I have replaced the .rar and added a readme with it.

Sincere apologies, Nilay

Re: spi driver for lcd interfacing

Posted: Mon Jan 09, 2017 8:48 pm
by rudi ;-)

Re: spi driver for lcd interfacing

Posted: Wed Jan 18, 2017 7:57 am
by MartyMacGyver
FWIW, I've gathered Sermus' LCD "HVAC" demo - as modified here for the ESP32 - into a repo. I forked Sermus' original repo and applied and credited the changes made by Rudi, Nilay, and myself (to get it to work).

This has NOT been updated to work with the latest toolchain (it currently works with the pre-2017-01-09 esp-idf and toolchain).

https://github.com/MartyMacGyver/ESP32_Adafruit_ILI9341

Re: spi driver for lcd interfacing

Posted: Thu Sep 21, 2017 9:51 pm
by sukeshak
Hi Rudi,

Is there a full library version of this using the ESP-IDF (latest SPI) for ILI9341-based 320x240 LCD ?
This spi_master sample is the only sample which works on my display under ESP-IDF.

Re: spi driver for lcd interfacing

Posted: Thu Sep 21, 2017 10:35 pm
by sukeshak
Or more importantly, how do you write a PutPixel function?

Re: spi driver for lcd interfacing

Posted: Tue Dec 12, 2017 7:54 am
by Vader_Mester
For a good library, try to use this one made by Loboris.

There is a github link in this post, and very good description on what it can do.

Re: spi driver for lcd interfacing

Posted: Fri Jul 06, 2018 12:37 am
by cadrjr1
ESP_Nilay wrote:
It's based on the esp-idf official sdk, and you can directly run a make flash in the example folder attached with this reply. It's yet to be merged, hence the attachment.

Attachments

ili9341_ui.rar
(100.45 KiB) Downloaded 152 times
I have tried to "make" this and I get the following error.
Any help appreciated as I am a very novice programmer ...
R

.......
AR build/idf_test/libidf_test.a
/c/Home/esp-idf/make/component_common.mk:1: Deprecated feature: No longer necessary to include comp onent_common.mk from /c/Home/esp/40_ili9341/components/ili9341/component.mk
CC build/ili9341/Font64.o
CC build/ili9341/Font32.o
CC build/ili9341/spi_ili.o
C:/Home/esp/40_ili9341/components/ili9341/spi_ili.c: In function 'ili_init':
C:/Home/esp/40_ili9341/components/ili9341/spi_ili.c:93:11: error: 'spi_bus_config_t {aka struct <an onymous>}' has no member named 'spiq_io_num'
buscfg.spiq_io_num = PIN_NUM_MISO;
^
C:/Home/esp/40_ili9341/components/ili9341/spi_ili.c:94:11: error: 'spi_bus_config_t {aka struct <an onymous>}' has no member named 'spid_io_num'
buscfg.spid_io_num = PIN_NUM_MOSI;
^
C:/Home/esp/40_ili9341/components/ili9341/spi_ili.c:95:11: error: 'spi_bus_config_t {aka struct <an onymous>}' has no member named 'spiclk_io_num'
buscfg.spiclk_io_num = PIN_NUM_CLK;
^
C:/Home/esp/40_ili9341/components/ili9341/spi_ili.c:96:11: error: 'spi_bus_config_t {aka struct <an onymous>}' has no member named 'spiwp_io_num'
buscfg.spiwp_io_num = -1;
^
C:/Home/esp/40_ili9341/components/ili9341/spi_ili.c:97:11: error: 'spi_bus_config_t {aka struct <an onymous>}' has no member named 'spihd_io_num'
buscfg.spihd_io_num = -1;
^
make[1]: *** [/c/Home/esp-idf/make/component_wrapper.mk:286: spi_ili.o] Error 1
make: *** [C:/Home/esp-idf/make/project.mk:467: component-ili9341-build] Error 2

Re: spi driver for lcd interfacing

Posted: Mon Jul 09, 2018 4:25 pm
by cadrjr1
MartyMacGyver wrote:FWIW, I've gathered Sermus' LCD "HVAC" demo - as modified here for the ESP32 - into a repo. I forked Sermus' original repo and applied and credited the changes made by Rudi, Nilay, and myself (to get it to work).

This has NOT been updated to work with the latest toolchain (it currently works with the pre-2017-01-09 esp-idf and toolchain).

https://github.com/MartyMacGyver/ESP32_Adafruit_ILI9341


Does anyone have a version of "HVAC Demo" that works with current Toolchain ?

R

Re: spi driver for lcd interfacing

Posted: Tue Jul 10, 2018 10:35 am
by cadrjr1
Got this sorted.
The SPI signal names have changed. See: https://esp32.com/viewtopic.php?t=918

Modifications to spi_ili.c below:

void ili_init(spi_device_handle_t* spi_dev)
{

// SPI signal names have changed. See:
// https://esp32.com/viewtopic.php?t=918

//Initialize SPI Bus for LCD
// spi_bus_config_t buscfg;
// buscfg.spiq_io_num = PIN_NUM_MISO;
// buscfg.spid_io_num = PIN_NUM_MOSI;
// buscfg.spiclk_io_num = PIN_NUM_CLK;
// buscfg.spiwp_io_num = -1;
// buscfg.spihd_io_num = -1;


spi_bus_config_t buscfg={
.miso_io_num = PIN_NUM_MISO,
.mosi_io_num = PIN_NUM_MOSI,
.sclk_io_num = PIN_NUM_CLK,
.quadwp_io_num = -1,
.quadhd_io_num = -1
};