iesalais 0 Posted April 3, 2018 Share Posted April 3, 2018 Hello, I've been trying to run an example called "graphicstest" from adafruit's ST7735 library on a TFT display using an MSP432. My problem is that, for some reason, software SPI works but not hardware SPI. The example "graphicstest" has an option to switch to software SPI by setting the MOSI and SCK pins to whatever i want and when i do that it works, the program does it's little test, but the problem with that is that it runs VERY slow so i kinda need this to work at its intended speed by using hardware SPI. if i hook up MOSI pin to P1.6 and SCK to P1.5 on my MSP432, nothing happens while using hardware SPI. but once i switch to software SPI and set MOSI as pin 15(P1.6) and SCK as pin 7(P1.5), it works. Can anyone help explain what is going on? P.S. this is what the code looks like when changing from Hardware to Software: // For the breakout, you can use any 2 or 3 pins // These pins will also work for the 1.8" TFT shield #define TFT_CS 18 //P3.0 on MSP432 #define TFT_RST 5 #define TFT_DC 8 // Option 1 (recommended): must use the hardware SPI pins // (for UNO thats sclk = 13 and sid = 11) and pin 10 must be // an output. This is much faster - also required if you want // to use the microSD card (see the image drawing example) Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST); // Option 2: use any pins but a little slower! #define TFT_SCLK 7 // set these to be whatever pins you like! #define TFT_MOSI 15 // set these to be whatever pins you like! //Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST); Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.