Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 9 1 2 3 ... LastLast
Results 1 to 25 of 214

Thread: RA8875 from Buydisplay

  1. #1
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92

    RA8875 from Buydisplay

    Hi all, My projects are running fine with a Teensy 3.6 but for better performance I like to use the Teensy 4, I use a RA8875 display from Buydisplay but when compiling I get a error. What can I do to get my programs to work with the new Teensy.

    Best,
    Johan

    #include <SPI.h>
    #include <Wire.h>
    #include <RA8875.h>
    void setup() {
    // put your setup code here, to run once:
    }
    void loop() {
    // put your main code here, to run repeatedly:
    }

    RA8875.cpp:476:11: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment csport = portOutputRegister(digitalPinToPort(_cs));//pinMode(_cs, OUTPUT);

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,248
    Somebody else asked the same question over in the 1.47 announcement thread. You might want to watch that thread as well in terms of getting an answer:

  3. #3
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    Quote Originally Posted by MichaelMeissner View Post
    Somebody else asked the same question over in the 1.47 announcement thread. You might want to watch that thread as well in terms of getting an answer:
    That's a pitty because the RA8875 from Buydisplay are one of the best displays on the market today, in one or other way there is a solution... because I have many projects that are working perfectly on a 3.6 and need more speed ... I hope someone will help.

    Best,
    Johan

  4. #4
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Quote Originally Posted by pd0lew View Post
    That's a pitty because the RA8875 from Buydisplay are one of the best displays on the market today, in one or other way there is a solution... because I have many projects that are working perfectly on a 3.6 and need more speed ... I hope someone will help.

    Best,
    Johan
    Check what I just posted in thread that @MichaelMeissner referenced: https://forum.pjrc.com/threads/57216...-1-47-Released.

    Cheeers

  5. #5
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    Hi all,

    I changed a bit the RA8875.ccp and the RA8875.h and have no any errors when compiling..... connected my RA display but nothing on the screen. I noticed that the clock on 13 (LED) goes more bright so I think something is working?

    I added the __IMXRT1062__ where is was needed in the .cpp ..... that's solve the errors for the Teensy4 what else can be wrong?

    Best,
    Johan

  6. #6
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    @pd0lew

    The version that gets intstalled with Teensyduino does not, work as pointed in the thread that @MichaelMeissner referenced.

    if you look at this post I put together some fixes using Sumotoys development branch that got it working with the T4: https://forum.pjrc.com/threads/57216...l=1#post213253

  7. #7
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    I tested this however without results, the _includes/RA8875_CPU_commons.h is not found.

    Best,
    Johan

  8. #8
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    @pd0lew - Johan

    Did you test with the example: benchmarks.ino in the _teensy3/examples. Also did you delete the old library in the teensy library folder and replace it with the new directory in the zip.

    Also, check the wiki for the buydisplay notes: https://github.com/sumotoy/RA8875/wiki

    Hard to help without more details, like the sketch you are using?

  9. #9
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    Hi,

    Perhaps I am looking wrong I dowloaded the stuff from https://github.com/mjs513/RA8875/tree/RA8875_t4 when I look into files examples I also so no benchmarks.ino .

    My test sketch is to simple:


    #include <SPI.h>
    #include <RA8875.h>
    #include <Wire.h>


    #define RA8875_RESET 255 //Not used
    #define RA8875_CS 10
    RA8875 tft = RA8875(RA8875_CS, RA8875_RESET, 11, 13, 12);

    void setup(){

    tft.begin(RA8875_800x480);

    tft.fillWindow(RA8875_WHITE);



    }

  10. #10
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,414
    Are we having an issue compiling or things not showing up on the display?

    The earlier compile issue was probably due to the registers associated with IO pins are 32 bits not 8 bits...

    But assuming that is corrected, I did not have any luck with the RA8875 displays I have from BuyDisplay.com...

    Again might help to know exactly which one you have and how you have it hooked up.
    That is some of them you hook up to +5v as it has it's own VR on it (and one of the jumpers is not set...) On others it does NOT have VR on board and jumper is set and you must supply 3.3v.

    I think I was at times able to get the one without VR to run on a T3.6, but when I tried on T4, I think it pulled too much 3.3v from it and would not run.

    As suggested in the wiki that MJS513 pointed to, you probably need an external power supply to run these.

    Also it recommended making hardware mods (like replace/remove) resistors... SO I punted for now...

  11. #11
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Ok the link you gave me when to the master branch for the library - you need to download this branch: https://github.com/mjs513/RA8875/tree/0.79b11p10

    I just compiled your sketch without a problem and checked the 0.79b11p10 branch and it has the benchmark.ino is in the teensy3 directory. Easiest thing to do is to place the downloaded directory in your Arduino libraries folder and delete the RA8875 folder in the ….\arduino-1.8.9\hardware\teensy\avr\libraries folder

    EDIT: as @KurtE it would also be good to know which display you have buydisplay

  12. #12
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    First I run many displays from Buydisplay 4.3, 5 and 7" runs perfectly with a Teensy 3.6.

    My test display is a RA8875 Buydisplay 4.3 " 800 x 480 pixels.

    Connections CS 10, MOSI 11 an MISO 12 SCK 13, I connected the RA displays many time to the Teensy 3.6 without any issues.
    Click image for larger version. 

Name:	ER-TFTM070-5.png 
Views:	8 
Size:	44.7 KB 
ID:	17323
    The supply is 5V (measured 4.98V)

    When there compile errors then there is no need to look to the hardware I suppose.

    Best,
    Johan

  13. #13
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    @mjs513
    A bit desperate.... do you use for sure a RA8875 from Buydisplay?


    In file included from /home/holstein/Arduino/libraries/RA8875-0.79b11p10/RA8875.h:149:0,
    from /home/holstein/Arduino/libraries/RA8875-0.79b11p10/examples/_teensy3/benchmarks/benchmarks.ino:7:
    /home/holstein/Arduino/libraries/RA8875-0.79b11p10/_includes/RA8875_CPU_commons.h:261:3: warning: #warning "Generic Arm detected, not sure if your board it's compatible!" [-Wcpp]
    #warning "Generic Arm detected, not sure if your board it's compatible!"
    ^
    In file included from /home/holstein/Arduino/libraries/RA8875-0.79b11p10/RA8875.h:149:0,
    from /home/holstein/Arduino/libraries/RA8875-0.79b11p10/RA8875.cpp:24:
    /home/holstein/Arduino/libraries/RA8875-0.79b11p10/_includes/RA8875_CPU_commons.h:261:3: warning: #warning "Generic Arm detected, not sure if your board it's compatible!" [-Wcpp]
    #warning "Generic Arm detected, not sure if your board it's compatible!"
    ^
    /home/holstein/Arduino/libraries/RA8875-0.79b11p10/RA8875.cpp: In member function 'void RA8875::begin(RA8875sizes, uint8_t)':
    /home/holstein/Arduino/libraries/RA8875-0.79b11p10/RA8875.cpp:476:11: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
    csport = portOutputRegister(digitalPinToPort(_cs));//pinMode(_cs, OUTPUT);
    ^
    Error compiling for board Teensy 4.0.

  14. #14
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,414
    @mjs513 and @pd0lew - I confirmed it does not build...

    Looks like in the last set of changes made to RA87875.h

    There were several #include lines that changed from:
    #include "_settings/xxx"
    to
    #include "_include/xxx"

    I changed all of these lines to _settings and it does build. I do see some warnings about generic... SO not sure if this is right?

    Or maybe new folder (_include) was created but uploaded?

    Kurt

  15. #15
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    I will let you know how I get this to work..... let me make a nice story.
    Click image for larger version. 

Name:	DeepinScreenshot_select-area_20190826164659.jpg 
Views:	24 
Size:	77.2 KB 
ID:	17325

  16. #16
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92

    Thanks for helping

    Hi all,

    Thanks for helping to get my beautiful RA8875 displays to work with the Teensy 4.

    I am so happy!

    Best regards,
    Johan

  17. #17
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Johan

    Glad you got it working. Be interesting to see what you did to get it working. Whats that little board you have between the display and T4? Level shifter or a tristate buffer or something else?

    Kurt
    Confused on what you changed - in which lib branch. There is _includes directory in the branch. It did compile for me but I don't have a BestBuy display to test with on the Adafruit RA8875 which I did test. Maybe I should pick one up

  18. #18
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    @mjs513,

    The tiny PCB is home made a AD7991 I2C 12 bits works also very nice with the T4.

    @Kurt,
    I included the new library's, it compiles without errors and runs smoothly.
    RA8875-0.79b11p10.zip

    Horiz/Vert Lines 52594
    Rectangles (outline) 265228
    Rectangles (filled) 265744
    Circles (filled) 146734
    Circles (outline) 142973
    Triangles (outline) 18195
    Triangles (filled) 57626
    Rounded rects (outline) 106239
    Rounded rects (filled) 902372
    --------------------------------

    screen:800x480 - rotation:0
    Benchmark Time (microseconds)
    Screen fill 16493
    Test Pixel 29
    Test Pixels 19419
    Text 3543
    Lines 85975
    Horiz/Vert Lines 52590
    Rectangles (outline) 265374
    Rectangles (filled) 265748
    Circles (filled) 146735
    Circles (outline) 142968
    Triangles (outline) 21212
    Triangles (filled) 60805
    Rounded rects (outline) 106215
    Rounded rects (filled) 902479
    --------------------------------

    screen:480x800 - rotation:1
    Benchmark Time (microseconds)
    Screen fill 16494
    Test Pixel 29
    Test Pixels 11659
    Text 3544
    Lines 85970
    Horiz/Vert Lines 52595
    Rectangles (outline) 265811
    Rectangles (filled) 265677
    Circles (filled) 146734
    Circles (outline) 142972
    Triangles (outline) 18195
    Triangles (filled) 57858
    Rounded rects (outline) 106183
    Rounded rects (filled) 902410




    Best,
    Johan

  19. #19
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    @pd0lew

    Did you make any changes to the library?

  20. #20
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    Yes ... a small one : || defined(__IMXRT1062__ on several place .... that's was it.

  21. #21
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Funny - thought I caught all of them.

  22. #22
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,414
    @mjs513 - There is no _include directory on your github branch: https://github.com/mjs513/RA8875/tree/RA8875_t4

  23. #23
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    Aha there must be changed one line too for the RA8875Usersettings.h this will speedup the thing/
    #if defined(SPI_HAS_TRANSACTION)
    //SPI transaction enabled library----------------------
    #if defined(__MK20DX128__) || defined(__IMXRT1062__) //[Teensy 3.0 , 3.1 , 3.2]
    const static uint32_t MAXSPISPEED = 23000000UL; //don't go higher than 22000000!;
    #elif defined(__MKL26Z64__) //[Teensy LC] (12 or 24 Mhz max)
    const static uint32_t MAXSPISPEED = 12000000UL; //default SPI main speed TeensyLC
    const static uint32_t MAXSPISPEED2 = 22000000UL; //don't go higher than 22000000!;
    #elif defined(___DUESTUFF) //[DUE]
    const static uint32_t MAXSPISPEED = 15000000UL; // try experiment higher values but NOT over 22000000!

  24. #24
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92
    Bechmark: SPI 23MHz

    screen:800x480 - rotation:0
    Benchmark Time (microseconds)
    Screen fill 16472
    Test Pixel 19
    Test Pixels 12367
    Text 2729
    Lines 82778
    Horiz/Vert Lines 49437
    Rectangles (outline) 264238
    Rectangles (filled) 264507
    Circles (filled) 137937
    Circles (outline) 134157
    Triangles (outline) 20217
    Triangles (filled) 59578
    Rounded rects (outline) 93816
    Rounded rects (filled) 892219
    --------------------------------

    screen:480x800 - rotation:1
    Benchmark Time (microseconds)
    Screen fill 16473
    Test Pixel 19
    Test Pixels 7392
    Text 2726
    Lines 82886
    Horiz/Vert Lines 49472
    Rectangles (outline) 264586
    Rectangles (filled) 264485
    Circles (filled) 137935
    Circles (outline) 134151
    Triangles (outline) 17231
    Triangles (filled) 56533
    Rounded rects (outline) 93934
    Rounded rects (filled) 892104
    --------------------------------

    screen:800x480 - rotation:2
    Benchmark Time (microseconds)
    Screen fill 16675
    Test Pixel 18
    Test Pixels 12367
    Text 2720
    Lines 82829
    Horiz/Vert Lines 49440
    Rectangles (outline) 264582
    Rectangles (filled) 264364
    Circles (filled) 137930
    Circles (outline) 134154
    Triangles (outline) 20190
    Triangles (filled) 59713
    Rounded rects (outline) 93865
    Rounded rects (filled) 892278
    --------------------------------

  25. #25
    Member
    Join Date
    May 2017
    Location
    Netherlands
    Posts
    92

Posting Permissions

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