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

Thread: Teensy 4.0 with Audio Board and ILI9341 screen wiring

  1. #1
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    33

    Teensy 4.0 with Audio Board and ILI9341 screen wiring

    Did somebody already wire the ILI9341 screen to Teensy 4.0 stacked with the new Audio Board? Ideally, without using the bottom connectors.
    Just trying to save myself some time figuring it out.
    Thank you.

  2. #2
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    33
    Sorry, forgot to ask what SD card reader will fit on Teensy 4.0 (bottom side) ? I've never done it and they all look so different.
    Can somebody point out one for me on Amazon, preferably?
    Thanks again.

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,246
    Quote Originally Posted by Andy Belov View Post
    Sorry, forgot to ask what SD card reader will fit on Teensy 4.0 (bottom side) ? I've never done it and they all look so different.
    Can somebody point out one for me on Amazon, preferably?
    Thanks again.
    Note, I haven't done it yet, but I suspect that there isn't room to solder a micro SD card directly to the Teensy. There are 2 or 3 bumps in the back of the Teensy that looks like they would be where the card reader would go. Even if the card reader clears those bumps, you might not be able to get a card into the reader.

    Instead what Paul did in the breakout board during the beta test and loglow looks like he is doing in his breakout board was you attach a FFC 1mm 8 position connector to the Teensy, and then use a 1mm 8 position FFC cable to connect those 8 pins to another FFC 1mm 8 position connector to the PCB, and from there on route the pins.


    Blackketter has a different approach to use a castlelated PCB with the center cut out, Then you connect it by making a solder bridge between the cutout register and the Teensy. There he just brings out the pins to the side of the Teensy that you can connect to a normal through hole solder micro SD card reader.

  4. #4
    Senior Member
    Join Date
    May 2016
    Posts
    218
    I've run the T4 with the ILI9341 Display, and the T4 with the Audio Board, but not all three together.
    That's my job for tomorrow. To be honest I'm still a bit confused as to whether they will play nice on the same SPI bus... I'll let you know how it works out.
    Do you have any suggestions on the pins to try?

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,666
    Quote Originally Posted by Andy Belov View Post
    Did somebody already wire the ILI9341 screen to Teensy 4.0 stacked with the new Audio Board? Ideally, without using the bottom connectors.
    Just trying to save myself some time figuring it out.
    Thank you.
    Looking at the Audio Adapter page for the New Rev D board : pjrc.com/store/teensy3_audio.html

    The SPI pins are in the 'normal' spots

    SCK 13
    MISO 12
    MOSI 11
    Just need to find an open CS pin for the display.

    Just soldered up a new Rev D board for Teensy 4. Did testing against the First Audio Tutorial and Pot and button pins worked - and the beep tone to headphones - then tested A Winbond 16 MB flash chip I soldered on to work as well as the SD Socket on the Audio board - including putting files on the SD card and transferring them to the Flash chip with the SerialFlash example.

  6. #6
    Senior Member
    Join Date
    May 2016
    Posts
    218
    From defragster: J
    ust need to find an open CS pin for the display.
    and that is where I'm totally confused!

    The T3.6 had a bunch of alternate pins for the SPI bus and it was necessary to use those alternates to have the TFT and audio board connected at the same time.
    The T4.0 hsa a bunch of SPI buses, and no alternate pins (that I can find),

    I have loglow's excellent pinout sheet - no CS alternates are there. So, the question is: can I steal any CS pin from another SPI port, or do I have to connect the display to its own dedicated SPI bus?

    A second question is: can I choose any available pin for D/C on the display?

    Aside: I'm wiring up a new general prototyping T4 board as we speak... To start with it will have the Audio board, display, a 16 channel port expander, rotary encoder, tactile switches, and one or two pots. I'm using my beta Loglow breakout board. It works, but pins 35 and 36 are wonky, (I hope he doesn't change the format on the next go-around)

  7. #7
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    33
    Hi Derek,
    Good to know that I'm not alone in this. I'm making a compact (big pocket size) musical instrument which needs a screen, the Audio Board, about 30 capacitive sensors, bluetooth with A2DP, USB host (for MIDI keyboards), gutar preamp (got this working yesterday), fast SD writer (for recording).
    And I need Teensy 4.0 for all this, because I need every bit of power for real-time pitch recognition from microphone and/or guitar.

    I know we'll do it. Today I have all Sunday to my self and I'm going to breadboard T4, the Audio Board and the screen.
    Let's see who wins (today).

  8. #8
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,188
    Quote Originally Posted by defragster View Post

    Just soldered up a new Rev D board for Teensy 4. Did testing against the First Audio Tutorial and Pot and button pins worked - and the beep tone to headphones - then tested A Winbond 16 MB flash chip I soldered on to work as well as the SD Socket on the Audio board - including putting files on the SD card and transferring them to the Flash chip with the SerialFlash example.
    FWIW, i too just soldered up Rev D audio board for T4. Soldered volume pot and teensy microphone. Mounted on T4 with female headers. Tested with WavFilePlayer with volume control and WAV files from uSD on shield. mic tests were good too.

    https://www.pjrc.com/store/teensy3_audio.html

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,666
    Quote Originally Posted by DerekR View Post
    From defragster: J
    and that is where I'm totally confused!

    The T3.6 had a bunch of alternate pins for the SPI bus and it was necessary to use those alternates to have the TFT and audio board connected at the same time.
    The T4.0 hsa a bunch of SPI buses, and no alternate pins (that I can find),

    I have loglow's excellent pinout sheet - no CS alternates are there. So, the question is: can I steal any CS pin from another SPI port, or do I have to connect the display to its own dedicated SPI bus?

    A second question is: can I choose any available pin for D/C on the display?

    Aside: I'm wiring up a new general prototyping T4 board as we speak... To start with it will have the Audio board, display, a 16 channel port expander, rotary encoder, tactile switches, and one or two pots. I'm using my beta Loglow breakout board. It works, but pins 35 and 36 are wonky, (I hope he doesn't change the format on the next go-around)
    On Teensy_4 the SPI doesn't have the ability to use hardware specific CS pins in the same special T_3.x way - so any available digital pin can be used for CS AFAIK based on watching KurtE work and making it work the best it can in that fashion.

    @KurtE might chime in - but the D/C pin is the same - or check the updated ILI9341 thread where the T4 was made to work - I haven't gotten back to that yet with this new setup.

    I was hoping to do a full build with a fresh T_4 using the OSH Blackketter breakout - but alas that didn't yield a usable board so I'm using another T4 instead for now - and distracted by doing my neglected outdoor 'summer chores' that need to be done for winter with fall here.


    @manitou - with the RevD board … got and installed a MIC and POT and full Audio Tutorial wire kit in addition to putting on the DigiKey Winbond flash. Tested enough to see that all work ( except MIC )

  10. #10
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    33
    I got it working, both the Audio Board and the screen, but only as long as I keep the SD card out of the Audio Board.
    As soon as I just stick the SD card back into the slot, the screen doesn't show the "Touched..." message in this test: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\XPT204 6_Touchscreen\examples\ILI9341Test
    Maybe it's because I don't initialize the SD library? Well, I was going to use Teensy on-board SD card anyway.

    I tried the guitar and peak meter for the microphone, all works.

    Here is my connection pins for the screen (the numbers are the Teensy pins):

    // Touch ---
    #define T_IRQ 16
    // T_DO: connected to TFT_SDO on the screen
    // T_DIN: connected to TFT_MOSI on the screen
    #define T_CS 9
    // T_CLK: connected to TFT_SCK on the screen
    // Screen ---
    #define TFT_SDO 12 // * (MISO), connected to T_DO on the screen
    #define TFT_LED 5 // 100 Ohm resistor
    #define TFT_SCK 13
    #define TFT_MOSI 11
    #define TFT_DC 5
    #define TFT_RST 255 // RESET: +3.3V, connected on the screen
    #define TFT_CS 14
    // GND
    // VCC: +3.3V


    Here is the modified ILI9341Test test:

    #define CS_PIN 9
    #define TFT_DC 5
    #define TFT_CS 14
    // MOSI=11, MISO=12, SCK=13

    #define TIRQ_PIN 16
    XPT2046_Touchscreen ts(CS_PIN, TIRQ_PIN);
    //XPT2046_Touchscreen ts(CS_PIN); // Param 2 - NULL - No interrupts
    //XPT2046_Touchscreen ts(CS_PIN, 255); // Param 2 - 255 - No interrupts
    //XPT2046_Touchscreen ts(CS_PIN, TIRQ_PIN); // Param 2 - Touch IRQ Pin - interrupt enabled polling

    ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC);
    ... the rest is as it was

  11. #11
    Senior Member
    Join Date
    May 2016
    Posts
    218
    Andy - You beat me!!! I didn't get very far at all today, I could find my plastic bag of female headers We have a local electronics parts store that's closed on Sundays, so I'll be able to get some in the morning...

    Anyway, It's great to hear of your success!

    @defragster - if you can use any pin as CS, do you know if there's a reason why specific pins are listed on the T4 card, and loglow's sheet? That's what's been confusing my tiny brain.

Posting Permissions

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