Go Down

Topic: Problems using SPI on MKRZero (Read 3067 times) previous topic - next topic

flyingbuddy

In communicating with max31855k thermocouple chip, found the clock (sck) running too fast, max 5mhz from data sheet.

Changing 5000000 in "SPI.beginTransaction(SPISettings(5000000, MSBFIRST, SPI_MODE0));" did not change sck. Tried various numbers 400 to 100000000 with no effect.

Had to resort to old code:-
 SPI.setClockDivider(16);
 SPI.setBitOrder(MSBFIRST);
 SPI.setDataMode(SPI_MODE0);

Am I missing something or is the IDE wrong ?

Also trying to access the on board sd card, what is the actual chip select pin so I can pulse and scope it ?
Code example does not give pin number
// MKRZero SD: SDCARD_SS_PIN
const int chipSelect = SDCARD_SS_PIN;

Many thanks in anticipation.

mglass

No idea myself about the SPI problem, but maybe this post will help:
https://forum.arduino.cc/index.php?topic=358160.msg3072021#msg3072021

As for the SD Card pin, this is mentioned on the following thread, as Pin 28

https://forum.arduino.cc/index.php?topic=444611.0

Go Up