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

Thread: second spi channel ?? teensy 4.1

  1. #1
    Member
    Join Date
    Apr 2020
    Location
    Guelph Ontario Canada
    Posts
    63

    second spi channel ?? teensy 4.1

    I recently received a weird 7.85" 1280 x 400 TFT display ...

    I did a search and I found a few posts where people have them working and I checked github so there is hope ...

    anyhow it uses an ra8876 for the graphics portion and it has a secondary chip which is used initially to set up the mode of operation .. both of them require SPI ..

    if I remember correctly the tri-state behaviour of the ra8876 is questionable and I would like to allocate 1 spi channel to the display driver .. and the second spi channel to the setup chip ..

    I'm currently running a teensy 4.0 but have e 4.1's on order and will probably migrate to the 4.1 processor...

    can somebody point me in a direction for implementing 2 SPI channels on the teensy 4.1 so I can bypass the tri-state issue with the ra8876?

    OR if there is a better solution .. I'm all ears

    thanks
    K
    Last edited by Keith_M; 08-11-2020 at 08:36 PM. Reason: typo

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,490
    One of these? https://www.buydisplay.com/spi-1280x...ve-touch-panel

    If so you might take a look at our RA8876 driver that a few of us have been playing with:
    https://github.com/wwatson4506/Ra8876LiteTeensy

    Note: Currently you need to use the other branch of the library: https://github.com/wwatson4506/Ra887...sy-ER-TFTM0874
    I have an open Pull Request to that branch to hopefully make it compatible with the other RA8876 boards we are using (1024x600), hopefully when a few people try out my PR to make sure it still works for the display I think you have, we will get this PR pulled into the branch I mentioned and then that branch PRd into master...

    More details in the thread https://forum.pjrc.com/threads/58565...sy-T36-and-T40

    As for MISO pin. You have a couple of issues. Use a secondary SPI port like SPI1.
    With MOSI1=26, SCK1=27, MISO1 = (1, 39) Note pin 1 is default to use 39 SPI1.setMISO(39); THere are a few hardware CS pins, not really used on this device so can be any digital pin.

    My adapter board, I have the option to put in a buffer to make it tristate. But the one board I populated, I shorted this out as I only use this display to test, so did not matter that other SPI devices may not work with it.

  3. #3
    Member
    Join Date
    Apr 2020
    Location
    Guelph Ontario Canada
    Posts
    63
    WOW .. KurtE .. thanks for the links and all ..greatly appreciated .. was not expecting that .. !!!
    Last edited by Keith_M; 08-12-2020 at 03:09 AM. Reason: typo

  4. #4
    Member
    Join Date
    Apr 2020
    Location
    Guelph Ontario Canada
    Posts
    63
    Hi KurtE .. I took a look at the code for the 7.84" display .. I'm good for the connection on the RA8876 standard SPI

    ER_TFT0784_t3 tft = ER_TFT0784_t3(
    // Teensy pin // Display pin
    10, // RA8876 CS 5
    14, // RA8876 RESET 11
    11, // RA8876 MOSI 7
    13, // RA8876 SCLK 8
    12, // RA8876 MISO 6

    But struggling where the SSD2828 Connections go on t4.1

    36, // SSD2828 CS 31
    38, // SSD2828 RESET 43
    4, // SSD2828 SDI 34
    37 // SSD2828 SCK 35
    );

    Could you provide me with some direction with respect to the SSD2828 pinout for the teensy 4.1 ?

    Thanks
    K

  5. #5
    Member
    Join Date
    Apr 2020
    Location
    Guelph Ontario Canada
    Posts
    63
    Does this make sense ?... ( Sorry I lack going beyond 1 device on SPI ..So uncharted ground for me LOL

    SSD2828 CS T4.1 Pin 38 CS1
    SSD2828 RESET T4.1 Pin ???
    SSD2828 SDI t4.1 Pin 26 MOSI1
    SSD2828 SCK T4.1 Pin 27 SCK1
    );

    not quite sure what to do with the reset..
    Last edited by Keith_M; 08-27-2020 at 03:47 PM. Reason: additional data

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,490
    Reset Depends on the device some work without using a IO pin and may or may not need to be connected to some voltage (either high or low... depending on device)...
    As for pins for SPI1, you look like you have the right pins for SCK1 and MOSI1.

    As for CS pin, can probably be any IO pin, unless the device is doing some very T4.x hardware specific.
    38 is a valid hardware SPI pin for SPI1, but again most devices don't do anything special with CS (that is they use something like digitalWrite to set and clear it.

  7. #7
    Member
    Join Date
    Apr 2020
    Location
    Guelph Ontario Canada
    Posts
    63
    Quote Originally Posted by KurtE View Post
    Reset Depends on the device some work without using a IO pin and may or may not need to be connected to some voltage (either high or low... depending on device)...
    As for pins for SPI1, you look like you have the right pins for SCK1 and MOSI1.

    As for CS pin, can probably be any IO pin, unless the device is doing some very T4.x hardware specific.
    38 is a valid hardware SPI pin for SPI1, but again most devices don't do anything special with CS (that is they use something like digitalWrite to set and clear it.
    Thanks Kurt .. Well .. I'll run it up and see what happens .. if I can get it to light up and run a demo .. I can go from there..

    cheers K

  8. #8
    Senior Member
    Join Date
    Aug 2017
    Posts
    306
    Quote Originally Posted by KurtE View Post
    One of these? https://www.buydisplay.com/spi-1280x...ve-touch-panel

    If so you might take a look at our RA8876 driver that a few of us have been playing with:
    https://github.com/wwatson4506/Ra8876LiteTeensy

    Note: Currently you need to use the other branch of the library: https://github.com/wwatson4506/Ra887...sy-ER-TFTM0874
    I have an open Pull Request to that branch to hopefully make it compatible with the other RA8876 boards we are using (1024x600), hopefully when a few people try out my PR to make sure it still works for the display I think you have, we will get this PR pulled into the branch I mentioned and then that branch PRd into master...

    More details in the thread https://forum.pjrc.com/threads/58565...sy-T36-and-T40

    As for MISO pin. You have a couple of issues. Use a secondary SPI port like SPI1.
    With MOSI1=26, SCK1=27, MISO1 = (1, 39) Note pin 1 is default to use 39 SPI1.setMISO(39); THere are a few hardware CS pins, not really used on this device so can be any digital pin.

    My adapter board, I have the option to put in a buffer to make it tristate. But the one board I populated, I shorted this out as I only use this display to test, so did not matter that other SPI devices may not work with it.
    @KurtE - Sorry for this late reply. I did do the pull request. Tested all of the examples and came up with the results you and @mjs513 did. Everything works. The font examples I still have to understand. They randomly produce different results. Could be my display setup.
    I think I am parallel with your repository now.

    Thanks for all of you and @mjs513 for your hard work on this rewrite of the library

  9. #9
    Junior Member
    Join Date
    Aug 2020
    Posts
    1
    Quote Originally Posted by KurtE View Post
    One of these? https://www.buydisplay.com/spi-1280x...ve-touch-panel

    If so you might take a look at our RA8876 driver that a few of us have been playing with:
    https://github.com/wwatson4506/Ra8876LiteTeensy

    Note: Currently you need to use the other branch of the library: https://github.com/wwatson4506/Ra887...sy-ER-TFTM0874
    I have an open Pull Request to that branch to hopefully make it compatible with the other RA8876 boards we are using (1024x600), hopefully when a few people try out my PR to make sure it still works for the display I think you have, we will get this PR pulled into the branch I mentioned and then that branch PRd into master...

    More details in the thread https://forum.pjrc.com/threads/58565...sy-T36-and-T40

    As for MISO pin. You have a couple of issues. Use a secondary SPI port like SPI1.
    With MOSI1=26, SCK1=27, MISO1 = (1, 39) Note pin 1 is default to use 39 SPI1.setMISO(39); THere are a few hardware CS pins, not really used on this device so can be any digital pin.

    My adapter board, I have the option to put in a buffer to make it tristate. But the one board I populated, I shorted this out as I only use this display to test, so did not matter that other SPI devices may not work with it.
    Kurt, huge thanks for everything i really appreciate it all. i'm a newbie, just registered, and i'm learning so all your info, link and entire post is super helpful for me. i wanted to ask you if you don't mind asking questions in case something goes wrong or if i have any other additional questions. thanks.

  10. #10
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,490
    You are welcome and welcome.

    And there are many of us up here on the forum, who try to help out as we can.

Posting Permissions

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