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

Thread: RA8876LiteTeensy For Teensy T36 and T40

Hybrid View

  1. #1
    Senior Member
    Join Date
    Aug 2017
    Posts
    300

    RA8876LiteTeensy For Teensy T36 and T40

    My RA8876 software driver for the BuyDisplay ER-TFTM101-1 10.1 inch tft display w/touch lcd module for use with the T36/T40.
    Found here:
    https://github.com/wwatson4506/Ra8876LiteTeensy

    Touch Screen only tested on the T36 using a slightly modified version of the XPT2046.cpp Teensy driver. Sharing
    SPI ports did not work out well so on the T36 with TallDog's breakout board I was using two SPI ports. One for the
    display and one for the touch screen.
    When a preassembled T40 breakout board (that I don't have to solder) with more than one available SPI port becomes
    available I will test on the T40 and add the XPT2046 files to the repository. To shackey to solder anymore

    WIP, Lot's to do yet functional.

    See README.txt and files in the repository for more information.
    The RA8876 does have the MISO tristate issue as the RA8875 has as well.

    This display is not cheap but works for what I wanted, To be able to see and read the thing
    Gives a lot more real estate than smaller displays, (1024x640) with 16MB of RAM.
    TechToys board uses 32MB of RAM. I think.
    Last edited by wwatson; 12-02-2019 at 12:32 AM.

  2. #2
    Senior Member
    Join Date
    Jan 2015
    Location
    UK
    Posts
    125
    I see the 10.1" display has a dot pitch of 0.2175(W)x0.2088(H)mm. Do you have any problem drawing a circle ? Does it look round ?

    I had loads of problems with non square pixels trying to draw circle and boxes.

  3. #3
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    Quote Originally Posted by skpang View Post
    I see the 10.1" display has a dot pitch of 0.2175(W)x0.2088(H)mm. Do you have any problem drawing a circle ? Does it look round ?

    I had loads of problems with non square pixels trying to draw circle and boxes.
    I haven't found that information yet, but when I draw a rectangle and use a magnifier glass pixels look round. My eyes are not that good.
    There is definitely gaps between the pixels on the horizontal axis which could indicate round pixels. On the vertical axis it is not that pronounced.
    I gave the wrong specs on the resolution of the screen with this driver. It is actually 1024x600 not 1024x640.

  4. #4
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    Quote Originally Posted by skpang View Post
    I see the 10.1" display has a dot pitch of 0.2175(W)x0.2088(H)mm. Do you have any problem drawing a circle ? Does it look round ?

    I had loads of problems with non square pixels trying to draw circle and boxes.
    @Kurte - I was actually thinking the same thing. But the RA8876 controller is quite a bit different than the RA8875 in a lot of ways.
    This is why I think Sumotoy started this GitHub site. https://github.com/sumotoy/RA8876 But sadly at this point has not been able to finish it.
    I want to research the commonality of the two chips as my time allows. One of the main differences are the amount display memory available and the way it is used.
    Trying to find the RA8875 reference manual in all my files
    Maybe you know but I think the display buffer size for the RA8875 is about 768k and the ER-TFTM101-1 has 16M available which with the RA8876 leads to several display page buffers.
    I use this in my RA8876 driver for virtual screens. Some of the basic graphic display engine function are close to the same. User defined characters, rotation, font scaling, mirroring, BTE engine functions and the two PIP windows are different. Maybe through emulation, not sure at this point.
    I would like to see a common driver for both display controllers, but that is probably beyond my skill level
    Sorry @kurte - Replied to the wrong post. Got pulled away again by hungry grand kids.
    Last edited by wwatson; 12-03-2019 at 02:38 AM. Reason: Miss posted:(

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,111
    @wwatson - Wondering how much different is this than the RA8875 boards? i.e. wondering if it makes sense to add support for this board into the RA8875 library code that we forked from Sumotoy?

    As you mentioned looks like it has same tri-state issue as their other boards.

  6. #6
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    @skpang - Just did another test with the circle command and used a line thickness of 50. In other words the outer radius was 100 and it repeated the circle 50 times reducing the radius by 1.
    From what I can see with a resolution of 1024X600, the pixels look square. Used white foreground and black background. Obviously with this resolution it left black squares in the solid white circle.
    They are square pixels.

  7. #7
    Senior Member
    Join Date
    Jan 2015
    Location
    UK
    Posts
    125
    Quote Originally Posted by wwatson View Post
    @skpang - Just did another test with the circle command and used a line thickness of 50. In other words the outer radius was 100 and it repeated the circle 50 times reducing the radius by 1.
    From what I can see with a resolution of 1024X600, the pixels look square. Used white foreground and black background. Obviously with this resolution it left black squares in the solid white circle.
    They are square pixels.
    I'm not talking about whether the pixel are square or round. I've used some large LCD, when I draw a circle, its not 100% round. It's an oval shape.

  8. #8
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    Quote Originally Posted by skpang View Post
    I'm not talking about whether the pixel are square or round. I've used some large LCD, when I draw a circle, its not 100% round. It's an oval shape.
    It's round.

  9. #9
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    @kurte - I have a couple of questions about the RA8875 display driver from Sumotoy. Has anybody got this working for the T36 and T4?
    If so do you know the links to the latest versions?
    The latest posts about this that I was able to find was this:
    https://forum.pjrc.com/threads/58337...is-it-possible
    But I am not clear if anybody has actually tried it on BuyDisplay's or Adafruit's RA8875 displays.

    Sorry if this redundant. Can't keep up with you guy's

  10. #10
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,111

  11. #11
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    Quote Originally Posted by KurtE View Post
    Thanks Kurte and mjs513. Works well with the sketches I have tested on the Adafruit RA8875 board.

  12. #12
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,461
    @wwatson, @KurtE, @defragster and others
    Started a restricting project on @wwatson's lib to try and make it feel and act like our other display libraries. Changes so far seem to work with the graphics.ino. Some of the things I am working on is making function calls similar:
    Code:
    tft_cls -> fillScreen
    getGwidth -> width
    getGheight -> height
    etc. This project is just starting and a lot more to be done. But so far so good.

    I put it up on a branch in my fork of the project: https://github.com/mjs513/Ra8876Lite...ee/RA8876-redo.

  13. #13
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,111
    Sounds good - One of these days my display may make it here 8)

  14. #14
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    That's awesome @mjs513 I'm glad to see somebody is trying to standardize the mess I made. I'll be glad to try and answer any questions you might have about it. And I will certainly do testing.

    Thanks

  15. #15
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,943
    Cool - no word on my DHL ship/delivery.

    github shows :: ER-TFTM101-1 is 1024x600 dots 10.1 "color tft lcd display with RA8876

    on the way here is :: ER-TFTM070-6 is 1024x600 dots 7 "color tft lcd module display with RA8876 : $50.05 before shipping { 7", 4 wire SPI, Cap Touch for 5V power, no Font Chip)

    BuyDisplay shipping notes are still DHL only - and closed May 1 to 6th:
    We temporarily canceled the shipment service of ePacket,EMS,China Post because overbooked.These shipping methods need at least 4-5 weeks longer than before,the reason is that many airlines are canceled due to COVID -19. Only DHL is available now. We'll recover these shipping methods once waiting time is bearable.

  16. #16
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,461
    Quote Originally Posted by defragster View Post
    Cool - no word on my DHL ship/delivery.

    github shows :: ER-TFTM101-1 is 1024x600 dots 10.1 "color tft lcd display with RA8876

    on the way here is :: ER-TFTM070-6 is 1024x600 dots 7 "color tft lcd module display with RA8876 : $50.05 before shipping { 7", 4 wire SPI, Cap Touch for 5V power, no Font Chip)

    BuyDisplay shipping notes are still DHL only - and closed May 1 to 6th:
    Yeah = the readme is probably going to be the last thing I am going to update But it does work with the 7" version as well.

    @wwatson - thanks will definitely ask questions if I get stuck. Right now I think I sorted out what you did and trying to simplify things. Did get print and println working so no more of the craziness of have to convert things to strings That will be in the next push I make.

  17. #17
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    That's great. The RA8876 chip has some good possibilities but can be tricky to use. Understanding the RA8876 manual is the other thing that took me some time. The terminology can be tough to decipher. This last weekend I played with display rotation. It is a little disappointing in the fact that you are limited to a 180 text screen flip or a left rotation of 90 degrees of a character font. Full rotation of the graphic screen should be possible but I did not have time to mess with it. You can rotate 270 degrees and I think with the mirror function you might be able to get full rotation.

  18. #18
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    Quote Originally Posted by wwatson View Post
    That's great. The RA8876 chip has some good possibilities but can be tricky to use. Understanding the RA8876 manual is the other thing that took me some time. The terminology can be tough to decipher. This last weekend I played with display rotation. It is a little disappointing in the fact that you are limited to a 180 text screen flip or a left rotation of 90 degrees of a character font. Full rotation of the graphic screen should be possible but I did not have time to mess with it. You can rotate 270 degrees and I think with the mirror function you might be able to get full rotation.
    Greetings all! I've been following this thread for awhile and finally got my display in to start playing with it for an upcoming controller project. I have ben able to get examples to compile for T40 (needed to change "setTextAt" to "setTextCursor" in both examples I tried) and have started to build some graphics for the controller. I was wondering if you had had any more success with screen and/or text rotation. I read up in the manual on initializing the screen and reorienting it in graphics mode, but even with changing the initialization in the library, I wasn't able to get it to rotate. I also discovered that as soon as you write text, it switches to text mode (makes sense), so the flip may not work for what I need anyways (a mixture of graphics and incoming data strings).

    Also, I think I will be relying on the putString command, so I rewrote that in the library, as it was not using the inputted coordinates for the function.

    Thanks everyone for their work on this, I look forward to helping in any way I can/sharing this project as it progresses.

    Code:
    //**************************************************************//
    /* Print a string using internal font or external font code     */
    //**************************************************************//
    void  Ra8876_Lite::putString(ru16 x0,ru16 y0, const char *str)
    {
      textMode(true);
      setTextCursor(x0, y0);//added 16 May 2020 to place strings in the correct location
      while(*str != '\0')
      {
        write(*str);
        ++str; 
      }
    }

  19. #19
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    Quote Originally Posted by beumerjm View Post
    Greetings all! I've been following this thread for awhile and finally got my display in to start playing with it for an upcoming controller project. I have ben able to get examples to compile for T40 (needed to change "setTextAt" to "setTextCursor" in both examples I tried) and have started to build some graphics for the controller. I was wondering if you had had any more success with screen and/or text rotation. I read up in the manual on initializing the screen and reorienting it in graphics mode, but even with changing the initialization in the library, I wasn't able to get it to rotate. I also discovered that as soon as you write text, it switches to text mode (makes sense), so the flip may not work for what I need anyways (a mixture of graphics and incoming data strings).

    Also, I think I will be relying on the putString command, so I rewrote that in the library, as it was not using the inputted coordinates for the function.

    Thanks everyone for their work on this, I look forward to helping in any way I can/sharing this project as it progresses.

    Code:
    //**************************************************************//
    /* Print a string using internal font or external font code     */
    //**************************************************************//
    void  Ra8876_Lite::putString(ru16 x0,ru16 y0, const char *str)
    {
      textMode(true);
      setTextCursor(x0, y0);//added 16 May 2020 to place strings in the correct location
      while(*str != '\0')
      {
        write(*str);
        ++str; 
      }
    }
    Hi beumerjm,

    I put in a weekend working on this. The RA8876 is going to be difficult to to implement full rotation with text. It seems to be geared more towards graphic rotation than text screen rotation. It will rotate text characters 90 degrees but that seems to be all. (Unless I am missing something). I am thinking that user defined characters defined in the three remaining angles my work but that's a lot of work. I have not had time to play with that any more.There are registers in RA8876 the change the origin and direction of the screen writes. Clear as mud HUH Same with me...

  20. #20
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,461
    Well just pushed another set of changes as well as updating the examples. So far the only 2 examples not working are scroll.ino and userdefinedfonts.ino. Getting too late now - guess that's the project for tomorrow. Didn't do anything with the vt100 piece though.

    @wwatson - cool about the screen rotation. That was on the list of things to do. Sounds like the problem I was having when I was playing with TechToys HDMI adapter which uses the RA8876 as well.

  21. #21
    Senior Member
    Join Date
    Aug 2017
    Posts
    300
    Yes, Me too. I Just go my 3" Male/Female jumper wires from Adafruit. This weekend I am going wire up the ER-TFTM101-1 display to the T4.0 and see if I can increase the SPI Speed. Not sure if I have the SPI interface configured right but the RA8876 SPI speed is rated at 50 MHz. The Best I can get is 34 MHz.

  22. #22
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,461
    Morning
    Resolved issue with external fonts and scroll up and down. Pushed the change and the updated sketches to the branch if anyone whats to give it a try.

  23. #23
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,461
    Ok - just made another update as well as updating the ReadMe

    Also, tested with my OpenGL library. Display looks great but some sort of frame buffering needs to be incorporated. So guess that's next.

  24. #24
    Member MorganS's Avatar
    Join Date
    Apr 2015
    Location
    Northern Nevada
    Posts
    63
    Wow! Thankyou!

    I just recently got some RA8876 displays (every different size that BuyDisplay sells) and I was dismayed to see that the RA8876 libraries are much less advanced than the popular Sumotoy library. I've been using that for many years on RA8875 displays. I was going to start this project today, but now I see you've already done it.

    My goal is to ultimately make the two libraries compatible so that older RA8875 code can be plugged into an RA8876 with minimal changes. That means maintaining #define's for color constants like RA8875_RED that will work on the newer chip. Obviously code that takes advantage of the RA8876 features like the larger memory won't fit on an RA8875 but simple stuff should be able to port back the opposite direction.

  25. #25
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,111
    Looks like you are making good progress

    Maybe there will be some left to do if/when mine arrives

    Frame buffer - Wondering about how the concept of the RA8875 Layers translates here. I get the impression you can setup your own pages, which can use up the extra memory of the display.

    I believe the library has/had the idea of this where there are something like 10 pages defined... Not sure if it works or not.

Posting Permissions

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