Code below copied from the Adafruit graphics sketch for the HX8357 3.5" tft display.
#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_HX8357.h"
// These are 'flexible' lines that can be changed
#define TFT_CS 15
#define TFT_DC 34 //(uno 9)
#define TFT_RST 33 // (uno 8) RST can be set to -1 if you tie it to Arduino's reset
//#define TFT_MOSI 11
//#define TFT_SCK 13
//#define TFT_MISO 12
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC);
Hi there,
I cannot get the display to work with my teensy 3.5. If I use the display with an Arduino Uno it works perfectly but the cs, dc and rst port pins are 8,9 and 10.
I am using the dc, cs and rst control lines with the above port pin numbers, that is RST 33, dc 34 and cs 15. On the teensy 3.5 pinout diagram the SPI port 0 is listed as
11 - MOSI, 13 sck and MISO as 12.
Can anybody help.
Thanks in advance
John
#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_HX8357.h"
// These are 'flexible' lines that can be changed
#define TFT_CS 15
#define TFT_DC 34 //(uno 9)
#define TFT_RST 33 // (uno 8) RST can be set to -1 if you tie it to Arduino's reset
//#define TFT_MOSI 11
//#define TFT_SCK 13
//#define TFT_MISO 12
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC);
Hi there,
I cannot get the display to work with my teensy 3.5. If I use the display with an Arduino Uno it works perfectly but the cs, dc and rst port pins are 8,9 and 10.
I am using the dc, cs and rst control lines with the above port pin numbers, that is RST 33, dc 34 and cs 15. On the teensy 3.5 pinout diagram the SPI port 0 is listed as
11 - MOSI, 13 sck and MISO as 12.
Can anybody help.
Thanks in advance
John