Need sample code for ILI9488 LCD on SPI Interface

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby loboris » Sun May 07, 2017 4:26 pm

The repository will be updated in the next couple of days.
I've made many changes to make it work faster and better. Jpeg image drawing will be fixed and bmp format added.
I'm also working on documenting all the functions.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Mon May 08, 2017 1:41 am

Thanks for quick reply...
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Mon May 08, 2017 5:44 pm

Hi Loboris,

If possible then can you please update your current Repository with JPEG image dotted issue as we require that fix ASAP?

It will be more helpful for me if you can provide that fix as quickly as possible because we have made lot many changes on top of your example to meet our application requirement.

Also, we need to showcase that demo to client as well as quickly as possible. It will be good if you provide other fixes later on based your schedule.
Regards,
Ritesh Prajapati

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby WiFive » Mon May 08, 2017 8:04 pm

Ritesh wrote:Hi Loboris,

If possible then can you please update your current Repository with JPEG image dotted issue as we require that fix ASAP?

It will be more helpful for me if you can provide that fix as quickly as possible because we have made lot many changes on top of your example to meet our application requirement.

Also, we need to showcase that demo to client as well as quickly as possible. It will be good if you provide other fixes later on based your schedule.
I hope you are paying this guy for his hard work.

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby loboris » Mon May 08, 2017 11:15 pm

@Ritesh
Not completed yet, but I've commited the changes to GitHub.
  • jpeg problem fixed
  • bmp format added (displayed in example)
  • default color mode is now 18-bit
  • added new color structure color_t {r,g,b} which is used with all color operations
  • added option to use DMA transfer in some operations where it makes sense (for example jpg decoding)
  • source restructured
  • I've discovered that ESP32 has jpeg decoder included in ROM, so tjpgd.c is removed and tjpgd.h from esp-idf is used
  • not yet fully documented
@WiFive
Good idea 8-)




Imagehttps://www.paypal.com/cgi-bin/webscr?c ... E5RV6MVM2U

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Tue May 09, 2017 2:03 am

loboris wrote:@Ritesh
Not completed yet, but I've commited the changes to GitHub.
  • jpeg problem fixed
  • bmp format added (displayed in example)
  • default color mode is now 18-bit
  • added new color structure color_t {r,g,b} which is used with all color operations
  • added option to use DMA transfer in some operations where it makes sense (for example jpg decoding)
  • source restructured
  • I've discovered that ESP32 has jpeg decoder included in ROM, so tjpgd.c is removed and tjpgd.h from esp-idf is used
  • not yet fully documented
@WiFive
Good idea 8-)




Imagehttps://www.paypal.com/cgi-bin/webscr?c ... E5RV6MVM2U
Thanks for quick reply..
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Tue May 09, 2017 5:41 am

Hi Loboris,

I just gone through your code and found that you are trying to port VFAT file system as well but somehow not able to success it as per your commented code. Also, you are moving from default partition to custom partition.

So, We have already ported SPIFFS file system for both ESP32 and ESP8266 and made it generic for both chip usage.

Please let me know if you need any help to port SPIFFS file system for ESP32.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Tue May 09, 2017 6:42 am

Hi Loboris,

Please find attached compressed file in which I have added SPIFFS file system component, one basic SPIFFS USer Guide Document and one example for how to use different SPIFFS APIs.

So, You can integrate it into your existing component or IDF component and can use SPIFFS file system into your repository.

Let me know if you need any help from my-side regarding that SPIFFS.
Attachments
esp32_spiffs_modified.7z
ESP32 SPIFFS File System Usage
(56.07 KiB) Downloaded 741 times
Regards,
Ritesh Prajapati

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby loboris » Wed May 10, 2017 2:41 pm

@Ritesh
GitHub repository is now updated with some changes, bug fixes, optimization, cleaning ...

Option to display in grayscale mode is added

esp-idf's Wear leveling FAT file system is now used to demonstrate displaying jpg image from file (esp-idf commit of 5. May 2017 or later must be used).

Some more documentation is added in *.h files.

Thanks for spiffs info, I'm using spiffs for couple of months and with VFS so that regular file related function can be used (fopen, fclose, fread, fwrite, etc.). I've also added directories and file timestamp features. Maybe I'll put it as an example on GitHub.

Code: Select all

I (1695) cpu_start: Pro cpu start user code
I (1748) cpu_start: Starting scheduler on PRO CPU.
I (1751) [SPI_FS]: Mounting FAT filesystem
E (1753) [SPI_FS]: FATFS mounted
E (1756) [SPI_FS]: JPG image found on file system

===================================
spi_master_nodma demo, LoBo 05/2017
===================================

SPI: display device added to spi bus
SPI: attached display device, speed=8000000
SPI: bus uses native pins: true
SPI: display init...
OK
-------------
 Disp clock =  8.00 MHz (requested:  8.00)
      Lines =  1396  ms (320 lines of 480 pixels)
 Read check      OK, line 218
     Pixels =  4151  ms (480x320)
        Cls =   475  ms (480x320)
-------------
-------------
 Disp clock = 10.00 MHz (requested: 10.00)
      Lines =  1395  ms (320 lines of 480 pixels)
 Read check      OK, line 293
     Pixels =  3572  ms (480x320)
        Cls =   382  ms (480x320)
-------------
-------------
 Disp clock = 16.00 MHz (requested: 16.00)
      Lines =  1394  ms (320 lines of 480 pixels)
 Read check      OK, line 300
     Pixels =  2718  ms (480x320)
        Cls =   244  ms (480x320)
-------------
### MAX READ SPI CLOCK set to 16.00 MHz ###
-------------
 Disp clock = 26.67 MHz (requested: 30.00)
      Lines =  1393  ms (320 lines of 480 pixels)
 Read check     Err, on line 232 at 17 (Read clock = 30.00 MHz)
     Pixels =  2131  ms (480x320)
        Cls =   152  ms (480x320)
-------------
-------------
 Disp clock = 40.00 MHz (requested: 40.00)
      Lines =  1392  ms (320 lines of 480 pixels)
 Read check      OK, line 163 (Read clock = 16.00 MHz)
     Pixels =  1835  ms (480x320)
        Cls =   106  ms (480x320)
-------------

Graphics demo started
---------------------

         DMA mode: OFF
   GRAYSCALE mode: OFF

Clear screen time: 226 ms
Display line time: 720 us
  JPG Decode time: 411 ms
Decode JPG (file): 411 ms
  BMP Decode time: 768 ms

         DMA mode: ON
   GRAYSCALE mode: OFF

Clear screen time: 106 ms
Display line time: 341 us
  JPG Decode time: 211 ms
Decode JPG (file): 211 ms
  BMP Decode time: 768 ms

         DMA mode: OFF
   GRAYSCALE mode: ON

Clear screen time: 453 ms
Display line time: 1586 us
  JPG Decode time: 742 ms
Decode JPG (file): 742 ms
  BMP Decode time: 1103 ms

         DMA mode: ON
   GRAYSCALE mode: ON

Clear screen time: 106 ms
Display line time: 958 us
  JPG Decode time: 557 ms
Decode JPG (file): 557 ms
  BMP Decode time: 1103 ms


Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Wed May 10, 2017 2:50 pm

loboris wrote:@Ritesh
GitHub repository is now updated with some changes, bug fixes, optimization, cleaning ...

Option to display in grayscale mode is added

esp-idf's Wear leveling FAT file system is now used to demonstrate displaying jpg image from file (esp-idf commit of 5. May 2017 or later must be used).

Some more documentation is added in *.h files.

Thanks for spiffs info, I'm using spiffs for couple of months and with VFS so that regular file related function can be used (fopen, fclose, fread, fwrite, etc.). I've also added directories and file timestamp features. Maybe I'll put it as an example on GitHub.

Code: Select all

I (1695) cpu_start: Pro cpu start user code
I (1748) cpu_start: Starting scheduler on PRO CPU.
I (1751) [SPI_FS]: Mounting FAT filesystem
E (1753) [SPI_FS]: FATFS mounted
E (1756) [SPI_FS]: JPG image found on file system

===================================
spi_master_nodma demo, LoBo 05/2017
===================================

SPI: display device added to spi bus
SPI: attached display device, speed=8000000
SPI: bus uses native pins: true
SPI: display init...
OK
-------------
 Disp clock =  8.00 MHz (requested:  8.00)
      Lines =  1396  ms (320 lines of 480 pixels)
 Read check      OK, line 218
     Pixels =  4151  ms (480x320)
        Cls =   475  ms (480x320)
-------------
-------------
 Disp clock = 10.00 MHz (requested: 10.00)
      Lines =  1395  ms (320 lines of 480 pixels)
 Read check      OK, line 293
     Pixels =  3572  ms (480x320)
        Cls =   382  ms (480x320)
-------------
-------------
 Disp clock = 16.00 MHz (requested: 16.00)
      Lines =  1394  ms (320 lines of 480 pixels)
 Read check      OK, line 300
     Pixels =  2718  ms (480x320)
        Cls =   244  ms (480x320)
-------------
### MAX READ SPI CLOCK set to 16.00 MHz ###
-------------
 Disp clock = 26.67 MHz (requested: 30.00)
      Lines =  1393  ms (320 lines of 480 pixels)
 Read check     Err, on line 232 at 17 (Read clock = 30.00 MHz)
     Pixels =  2131  ms (480x320)
        Cls =   152  ms (480x320)
-------------
-------------
 Disp clock = 40.00 MHz (requested: 40.00)
      Lines =  1392  ms (320 lines of 480 pixels)
 Read check      OK, line 163 (Read clock = 16.00 MHz)
     Pixels =  1835  ms (480x320)
        Cls =   106  ms (480x320)
-------------

Graphics demo started
---------------------

         DMA mode: OFF
   GRAYSCALE mode: OFF

Clear screen time: 226 ms
Display line time: 720 us
  JPG Decode time: 411 ms
Decode JPG (file): 411 ms
  BMP Decode time: 768 ms

         DMA mode: ON
   GRAYSCALE mode: OFF

Clear screen time: 106 ms
Display line time: 341 us
  JPG Decode time: 211 ms
Decode JPG (file): 211 ms
  BMP Decode time: 768 ms

         DMA mode: OFF
   GRAYSCALE mode: ON

Clear screen time: 453 ms
Display line time: 1586 us
  JPG Decode time: 742 ms
Decode JPG (file): 742 ms
  BMP Decode time: 1103 ms

         DMA mode: ON
   GRAYSCALE mode: ON

Clear screen time: 106 ms
Display line time: 958 us
  JPG Decode time: 557 ms
Decode JPG (file): 557 ms
  BMP Decode time: 1103 ms

Thanks for update.

I will check and will let you know if any issue.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: REEASD, snutw_ and 152 guests