Hey guys, I'm trying to use a teensy 4.0 for a SPI project.
However, when I read my pin 13 (Which if I'm not mistaken is the SPI SCK pin) it appears like this:
which does not look like a SPI clock sync signal
Any idea what I'm doing wrong?
Thanks for the help in advance.
EDIT: for reference, there is nothing plugged in except USB, the O-scope ground wire to the pin next to pin 0, and the o-scope signal wire to pin 13.
C++:
#include <Arduino.h>
#include <SPI.h> // include the SPI library:
const int slaveSelectPin = 10;
void setup() {
// set the slaveSelectPin as an output:
pinMode (slaveSelectPin, OUTPUT);
// pinMode (LED_BUILTIN, OUTPUT);
// initialize SPI:
SPI.begin();
SPI.beginTransaction(SPISettings(2000000, MSBFIRST, SPI_MODE1));
SPI.endTransaction();
//start serial:
// Serial.begin(9600);
}
SPISettings settingsA(2000000, MSBFIRST, SPI_MODE1);
uint8_t stat, val1, val2, result;
void loop() {
delay(1);
digitalWrite(slaveSelectPin, LOW); // take the SS pin low to select the chip:
stat = SPI.transfer(0x00);
// delay(200);
digitalWrite(slaveSelectPin, HIGH); // take the SS pin high to de-select the chip:
delay(1);
// //print stat
// Serial.print("stat: ");
// Serial.println(stat, BIN);
}
However, when I read my pin 13 (Which if I'm not mistaken is the SPI SCK pin) it appears like this:
which does not look like a SPI clock sync signal
Any idea what I'm doing wrong?
Thanks for the help in advance.
EDIT: for reference, there is nothing plugged in except USB, the O-scope ground wire to the pin next to pin 0, and the o-scope signal wire to pin 13.
Last edited: