Forum Rule: Always post complete source code & details to reproduce any issue!
Page 24 of 24 FirstFirst ... 14 22 23 24
Results 576 to 590 of 590

Thread: Highly optimized ILI9341 (320x240 TFT color display) library

  1. #576
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,624
    Quote Originally Posted by mjs513 View Post
    @KurtE and @Projectitis

    I incorporated the changes into my copy of the ILI9341_t3 library and the fonts do look nice - but as you said does take a bit longer but the quality is nicer especially for the larger fonts. I did test with the scrolltest.ino sketch but the fonts didn't seem to work as well but I don't have time to debug right now maybe later. But it does work.
    It is now pulled in to the ili9341_t3n library

    Thanks
    Kurt

  2. #577
    Senior Member Projectitis's Avatar
    Join Date
    Feb 2018
    Location
    New Zealand
    Posts
    170
    Hi @mjs513 - I've got family here for a few days, but after that I'll take a look I have a fix for the speed that will make it actually faster than the standard non ant-aliased font rendering, and I'll also debug the scrolling. I realised that I haven't published the script to create anti-aliased fonts either, so I'll do that too!

    @KurtE - fantastic, thank you In my libraries I typedef ILI9341_t3_font_t as packedbdf_t so that it isn't named after a display. What do you think of this strategy going forward?

  3. #578
    Senior Member Projectitis's Avatar
    Join Date
    Feb 2018
    Location
    New Zealand
    Posts
    170
    Scripts and instructions to create packed BDF anti-aliased fonts here:
    https://github.com/projectitis/packedbdf

    Full description of packedbdf_t data type also in the repo. Many thanks to Paul, spook and others for their initial work on all this material!
    note: packedbdf_t and ILI9341_t3_font_t are the same thing.

  4. #579
    Senior Member Projectitis's Avatar
    Join Date
    Feb 2018
    Location
    New Zealand
    Posts
    170
    Quote Originally Posted by mjs513 View Post
    I incorporated the changes into my copy of the ILI9341_t3 library and the fonts do look nice - but as you said does take a bit longer but the quality is nicer especially for the larger fonts. I did test with the scrolltest.ino sketch but the fonts didn't seem to work as well but I don't have time to debug right now maybe later. But it does work.
    @mjs513 I have updated my branch of Paul's ILI9341_t3 library with more efficient anti-alias rendering. Its about 25% faster than the standard non-anti-aliased rendering!
    Normal rendering: 14971
    Anti-aliased rendering: 11551

    I'll take a look at what's happening with scrolltest now (on KurtE's t3n version).

    EDIT: Have made a new example in my version of _t3n. I just had to change the call to setTextColor to also specify the background color.

    It still looks slightly wrong when the text is printed on the green bar at the bottom of the white box - the text that extends into the white box still has a green background color behind it. Since I'm not entirely sure what your intention is with scrolltest, I'll leave it at that for now and let you look into it if it's a problem?
    Last edited by Projectitis; 04-24-2019 at 05:30 AM.

  5. #580
    Senior Member Projectitis's Avatar
    Join Date
    Feb 2018
    Location
    New Zealand
    Posts
    170
    Aaaand have improved the original font rendering speed (1bpp, non anti-aliased fonts) of ILI9341_t3:
    original 1bpp fonts 14971
    improved 1bpp fonts 11360 (~25% faster)
    (Compare to new anti-alias fonts 11551)

    Find updates here: https://github.com/projectitis/ILI93...ti-alias-fonts

  6. #581
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,490
    Sounds like some good work

  7. #582
    Wow. 4/24/19 was the last update on this thread?

    What about T4 and ili9341_t3? Is there an ILI9341_t4 I'm missing somewhere?

  8. #583
    Junior Member
    Join Date
    Jan 2020
    Posts
    1
    HI All,
    I'm relatively new here, just tried this library on the T4 but just getting a white screen. If I use the adafruit library with the same wiring and pin assignments it works fine.
    Has anybody had this working with a t4 yet?

    thanks in advance
    Tony

  9. #584
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,624
    Quote Originally Posted by tonykenny View Post
    HI All,
    I'm relatively new here, just tried this library on the T4 but just getting a white screen. If I use the adafruit library with the same wiring and pin assignments it works fine.
    Has anybody had this working with a t4 yet?

    thanks in advance
    Tony
    Yes I have it working...

    It would help if you maybe gave a little more details, like, what version of Arduino and Teensyduino you are using? Platform maybe although maybe not so much in this case.

    But more importantly more details on how you have it wired in? Which display are you using...
    Which sketch and how is it configured? i.e. does your wiring match for MOSI, MISO, SCL as well as DC and CS? Do you have RST connected to a pin? If so do you specify it in the constructor and does it match your wiring

  10. #585
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,812
    I can also confirm it definitely does work.

    Quote Originally Posted by tonykenny View Post
    If I use the adafruit library with the same wiring and pin assignments it works fine.
    Adafruit's libraries support more pin combinations. Many of their libs support almost any pins, using slow GPIO access to the pins rather than hardware SPI. So one possible explanation is you may have used a pin assignment that's not supported by the optimized library, but works with Adafruit's lib because of their support for slow access using any pins. But really, that's just a blind guess, since I can't see your hardware & wiring, can't see your code or screen.

  11. #586
    I also have it working but my setup on SPI0 required 100 ohm series resistors on MOSI, MISO and SCK at the Teensy end. I also share SPI0 with touch (XPT2046) and SD card through the same resistors, all working properly.

  12. #587
    Junior Member
    Join Date
    Apr 2020
    Posts
    4
    I cannot even compile ILI9341_t3 graphicstest example.
    Isn't it compatible with T4 (or teensyduino 1.51)?

    Am i missing something?

    PS: Adafruit GFX library is installed. BTW using Adafruit ILI9341.h and their own graphicstest example compiles and works just fine.

    Code:
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitFifoNotFull()':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:178:9: error: 'KINETISK_SPI0' was not declared in this scope
    
        sr = KINETISK_SPI0.SR;
    
             ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitFifoEmpty()':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:187:9: error: 'KINETISK_SPI0' was not declared in this scope
    
        sr = KINETISK_SPI0.SR;
    
             ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitTransmitComplete()':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:193:12: error: 'KINETISK_SPI0' was not declared in this scope
    
       while (!(KINETISK_SPI0.SR & SPI_SR_TCF)) ; // wait until final output done
    
                ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:193:31: error: 'SPI_SR_TCF' was not declared in this scope
    
       while (!(KINETISK_SPI0.SR & SPI_SR_TCF)) ; // wait until final output done
    
                                   ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:194:9: error: 'KINETISK_SPI0' was not declared in this scope
    
       tmp = KINETISK_SPI0.POPR;                  // drain the final RX FIFO word
    
             ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writecommand_cont(uint8_t)':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:197:3: error: 'KINETISK_SPI0' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
    
       ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:197:67: error: 'SPI_PUSHR_CTAS' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
    
                                                                       ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:197:71: error: 'SPI_PUSHR_CONT' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
    
                                                                           ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata8_cont(uint8_t)':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:201:3: error: 'KINETISK_SPI0' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
    
       ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:201:64: error: 'SPI_PUSHR_CTAS' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
    
                                                                    ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:201:68: error: 'SPI_PUSHR_CONT' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
    
                                                                        ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata16_cont(uint16_t)':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:205:3: error: 'KINETISK_SPI0' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;
    
       ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:205:64: error: 'SPI_PUSHR_CTAS' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;
    
                                                                    ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:205:68: error: 'SPI_PUSHR_CONT' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;
    
                                                                        ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writecommand_last(uint8_t)':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:210:3: error: 'KINETISK_SPI0' was not declared in this scope
    
       KINETISK_SPI0.SR = SPI_SR_TCF;
    
       ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:210:22: error: 'SPI_SR_TCF' was not declared in this scope
    
       KINETISK_SPI0.SR = SPI_SR_TCF;
    
                          ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:211:67: error: 'SPI_PUSHR_CTAS' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0);
    
                                                                       ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata8_last(uint8_t)':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:216:3: error: 'KINETISK_SPI0' was not declared in this scope
    
       KINETISK_SPI0.SR = SPI_SR_TCF;
    
       ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:216:22: error: 'SPI_SR_TCF' was not declared in this scope
    
       KINETISK_SPI0.SR = SPI_SR_TCF;
    
                          ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:217:64: error: 'SPI_PUSHR_CTAS' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0);
    
                                                                    ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata16_last(uint16_t)':
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:222:3: error: 'KINETISK_SPI0' was not declared in this scope
    
       KINETISK_SPI0.SR = SPI_SR_TCF;
    
       ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:222:22: error: 'SPI_SR_TCF' was not declared in this scope
    
       KINETISK_SPI0.SR = SPI_SR_TCF;
    
                          ^
    
    C:\Users\Thanos\Documents\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:223:64: error: 'SPI_PUSHR_CTAS' was not declared in this scope
    
       KINETISK_SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1);
    
                                                                    ^

  13. #588
    Junior Member
    Join Date
    Apr 2020
    Posts
    4
    My mistake (the above); I had downloaded and installed the latest ILI9341_t3 via IDE's library manager instead using the one that was already installed by teensyduino 1.51.
    That compiles and works fine on T4.

    Sorry for the false alarm!

  14. #589
    Senior Member jim lee's Avatar
    Join Date
    Dec 2016
    Location
    Anacortes, WA
    Posts
    156
    Same thing. I can't compile this library. To update is the easiest thing to do just to grab a new teensyduino?

    Code:
    #include <Adafruit_GFX.h>
    #include <ILI9341_t3.h>
    
    
    void setup() {
    
    }
    
    void loop() {
    
    }
    Thanks!

    -jim lee

  15. #590
    Senior Member jim lee's Avatar
    Join Date
    Dec 2016
    Location
    Anacortes, WA
    Posts
    156
    Update to above..

    D-loaded fresh arduino and the new teensyduino. Mac OS 10.13.6

    Same result.

    Code:
    Multiple libraries were found for "Adafruit_GFX.h"/var/folders/wt/mcbdk5yn5wz6z1zcpf20xvzw0000gn/T/arduino_build_493687/libraries/ILI9341_t3/ILI9341_t3.cpp.o: In function `Adafruit_GFX_Button::drawButton(bool)':
    
     Used: /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Adafruit_GFX
     Not used: /Users/jimlee/Documents/Arduino/libraries/Adafruit_GFX_Library
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3/ILI9341_t3.cpp:1851: multiple definition of `Adafruit_GFX_Button::drawButton(bool)'
    /var/folders/wt/mcbdk5yn5wz6z1zcpf20xvzw0000gn/T/arduino_build_493687/libraries/Adafruit_GFX/Adafruit_GFX.cpp.o:/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Adafruit_GFX/Adafruit_GFX.cpp:1587: first defined here
    /Applications/Teensyduino.app/Contents/Java/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: Disabling relaxation: it will not work with multiple definitions
    /var/folders/wt/mcbdk5yn5wz6z1zcpf20xvzw0000gn/T/arduino_build_493687/libraries/ILI9341_t3/ILI9341_t3.cpp.o: In function `Print::flush()':
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3/ILI9341_t3.cpp:1377: multiple definition of `Adafruit_GFX_Button::contains(short, short)'
    /var/folders/wt/mcbdk5yn5wz6z1zcpf20xvzw0000gn/T/arduino_build_493687/libraries/Adafruit_GFX/Adafruit_GFX.cpp.o:/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Print.h:61: first defined here
    collect2: error: ld returned 1 exit status
    Error compiling for board Teensy 3.2 / 3.1.
    Also, what is this new way of doing things? teensyduino.. Is it a replacement of the IDE? Because that's the way it seems to be acting on my machine. It has the same icon as the IDE, it runs like the IDE. Do I still need the original IDE? Confused here.

    -jim lee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •