Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 10 of 10

Thread: Teensy 4.0 + RA8875

  1. #1
    Junior Member
    Join Date
    Jan 2020
    Posts
    11

    Teensy 4.0 + RA8875

    Hey guys,

    So currently I have hooked up an 4.3" RA8875 TFT screen to my teensy 4.0 and it works fine.
    I was just wondering if there was some intuitive program that could be used as a GUI editor, such as Qt or GUIslice builder.
    Both of these claim to have support for the Teensy 4.0 and/or the RA8875 screens, but I cannot find any documentation or tutorials on how to get this to work.

    Any and all help is appreciated.

    Kind regards.

  2. #2
    Junior Member
    Join Date
    Jan 2020
    Posts
    11
    To give an update, this is how far i've come myself:

    Click image for larger version. 

Name:	0ee5e88b5aab5fd010eb419f593a87ba.png 
Views:	0 
Size:	2.9 KB 
ID:	19059

    This is what i created in GUI Slice Builder

    Click image for larger version. 

Name:	a45be442-2f2e-4529-8373-a7c10f64cf21.jpg 
Views:	2 
Size:	62.4 KB 
ID:	19060

    This is what my display shows. So technically i'm close, but also far off.

    This is the test file that was generated by GUI Slice Builder:
    https://pastebin.com/uCYMP7TF

    This is the config I've adapted:
    https://pastebin.com/CNyXVLm9

  3. #3
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,580
    You may want to check you display resolution:
    Code:
      // Select the RA8875 display resolution:
      // - RA8875_480x272 = 480x272 (4.3" display)
      // - RA8875_800x480 = 800x480 (5" and 7" displays)
      #define DRV_DISP_ADAGFX_RA8875_INIT RA8875_800x480
    You may need to change this is 480x272 instead of 800x480. Never used these builders so would have to dig into it. You may have to edit display file as well for your display not sure

  4. #4
    Junior Member
    Join Date
    Jan 2020
    Posts
    11
    Quote Originally Posted by mjs513 View Post
    You may want to check you display resolution:
    Code:
      // Select the RA8875 display resolution:
      // - RA8875_480x272 = 480x272 (4.3" display)
      // - RA8875_800x480 = 800x480 (5" and 7" displays)
      #define DRV_DISP_ADAGFX_RA8875_INIT RA8875_800x480
    You may need to change this is 480x272 instead of 800x480. Never used these builders so would have to dig into it. You may have to edit display file as well for your display not sure
    I did not see this, thanks for your keen eye. I will try this first thing in the morning.
    Also, there is an DPI setting, would this, or could this affect the way the screen works? If so, I couldn't find the DPI value of the Adafruit RA8875 480x272 4.3" display anywhere, and measuring it up manually would seem a bit inaccurate.

  5. #5
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,580
    The dpi setting is the 480x272. Yep it can define the way it works but you have to give it a try. If you look at the comments right about what I think you may want to try is:
    Code:
    #define DRV_DISP_ADAGFX_RA8875_INIT RA8875_480x272
    which the comment next to is says is for a 4.3in display. The way its set up is for a RA8875 800x480 dpi display.

  6. #6
    Junior Member
    Join Date
    Jan 2020
    Posts
    11
    Quote Originally Posted by mjs513 View Post
    The dpi setting is the 480x272. Yep it can define the way it works but you have to give it a try. If you look at the comments right about what I think you may want to try is:
    Code:
    #define DRV_DISP_ADAGFX_RA8875_INIT RA8875_480x272
    which the comment next to is says is for a 4.3in display. The way its set up is for a RA8875 800x480 dpi display.
    That I understand, but in GUI Slicer you can also set up the width, height and dpi (dots per inch) of the screen. I'm not sure if the dpi setting influences anything.

  7. #7
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,580
    You will probably have modify in a couple of other places as well to get it to work properly. I saw this in one of the issues to set up a config:

    Uncomment /configs/ard-adagfx-ra8875-notouch.h in /src/GUIslice_config.h

    Then you may have to edit the ra8875 config file as well. There doesn't seem to be one place where its all at.

    EDIT: also check your pin numbers to make sure they line up but probably they are since you are getting something.

  8. #8
    Junior Member
    Join Date
    Jan 2020
    Posts
    11
    Quote Originally Posted by mjs513 View Post
    You will probably have modify in a couple of other places as well to get it to work properly. I saw this in one of the issues to set up a config:

    Uncomment /configs/ard-adagfx-ra8875-notouch.h in /src/GUIslice_config.h

    Then you may have to edit the ra8875 config file as well. There doesn't seem to be one place where its all at.

    EDIT: also check your pin numbers to make sure they line up but probably they are since you are getting something.
    Unfortunately checking both files for anything that could cause problems, and tweaking those, didn't really change anything. Even the setting you spotted earlier didn't change it. I guess I'll just use the "hardcore" way of defining your own shapes for now.

  9. #9
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,075
    Also maybe check the SPI speed. Maybe depending on your setup, it is trying to drive SPI too fast...

  10. #10
    Junior Member
    Join Date
    Jan 2020
    Posts
    11
    Quote Originally Posted by KurtE View Post
    Also maybe check the SPI speed. Maybe depending on your setup, it is trying to drive SPI too fast...
    Hmm possible, I'll see if I can find where this is located, if tweakable at all.

Posting Permissions

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