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

Thread: Teensy 3.6 with HX8357 and Audio Shield - Alt SPI pins

  1. #1
    Junior Member
    Join Date
    May 2019
    Location
    Colorado, USA
    Posts
    4

    Teensy 3.6 with HX8357 and Audio Shield - Alt SPI pins

    I am planning on using the Teensy 3.6 with the Adafruit HX8357 board and the PJRC Audio Shield. Both devices work great independently, but not together. I am trying to move the tft SPI pins to:
    MOSI = 7, MISO = 8 and SCLK = 14. I just can't get it to work... Any thoughts on what I need to do? Thanks, Len.

    No Error messages, compiles fine but screen is blank white. On default SPI pins (MOSI = 11, MISO = 12 and SCLK = 13), screen works.
    Using Arduino IDE with HX8357_t3 library.

    Here is the code: (you can see from the comments that I tried SPI2 without success...)

    /***************************** Includes ***************************/
    #include "SPI.h"
    //#include <Adafruit_GFX.h>
    //// Fonts
    //#include <Fonts/FreeSans9pt7b.h>
    //#include <Fonts/FreeSans12pt7b.h>
    //#include <Fonts/FreeSans24pt7b.h>
    //#include <Fonts/FreeSansBold24pt7b.h>

    #include "Encoder.h"

    #include "EEPROM.h"

    #include "HX8357_t3.h"

    //#include <C:/program files(x86)/Arduino/hardware/Teensy/AVR/libraries/adafruit_gfx/Adafruit_GFX.h>
    //#include <Adafruit_GFX.h>



    /***************************** Constants ***************************/
    const byte Dot = 1;
    const byte DotPin = 24;
    const byte Dash = 3;
    const byte DashPin = 25;

    const byte ElementSpace = 0;
    const byte EncPin1 = 29;
    const byte EncPin2 = 30;

    const byte KeyOutPin = 26;

    const byte MaxMenuItem = 3;
    const byte MenuPin = 28;

    const byte NotKeyOutPin = 27;

    const byte TFT_DC = 9; //SPI0 = 9 //SPI2 = 54
    const byte TFT_CS = 10; //SPI0 = 10 //SPI2 = 43
    const byte TFT_RST = 0xFF;
    const byte TFT_MOSI = 11; //SPI0 = 11 //SPI2 = 44
    const byte TFT_SCLK = 13; //SPI0 = 13 //SPI2 = 46
    const byte TFT_MISO = 12; //SPI0 = 12 //SPI2 = 45

    HX8357_t3 tft = HX8357_t3(TFT_CS, TFT_DC, TFT_RST, TFT_MOSI, TFT_SCLK, TFT_MISO);

    /***************************** Global Variables ***************************/

  2. #2
    Junior Member
    Join Date
    May 2019
    Location
    Colorado, USA
    Posts
    4
    I got it working. It was a broken wire. When it was on the default pin, all was well. When I moved it to the allt pin, it did not work.

Posting Permissions

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