BusPirate & SPI with MAX31855 Thermocouple

Hacking multi-tool. Get one for $30, including worldwide shipping.

BusPirate & SPI with MAX31855 Thermocouple

Postby CheezeWiz » Sun Jul 09, 2017 5:44 pm

Good afternoon,

I have a arduino sketch that compiles fine and it runs my code as expected and I thought it would be neat to try and do the same thing with a bus pirate... further my lack of knowledge on SPI...

Digging through the library in the source I found
Code: Select all
  SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));  // Defaults
  data.bytes[3] = SPI.transfer(0x00);
  data.bytes[2] = SPI.transfer(0x00);
  data.bytes[1] = SPI.transfer(0x00);
  data.bytes[0] = SPI.transfer(0x00);

  digitalWrite(cs, HIGH);

What I would like to understand is how to properly do the same thing with bus pirate syntax?
I know I need to use [ to pull CS low and it looks like it sends data, then reads data, then sends data exct...

Could someone help out with the syntax when you go into the SPI mode? and then perhaps what string to type in on the command line?

Datasheet for you folks.

Thank you much,
Jr. Member
Jr. Member
Posts: 55
Joined: Fri Mar 04, 2011 4:16 pm

Re: BusPirate & SPI with MAX31855 Thermocouple

Postby USBEprom » Mon Jul 10, 2017 2:48 pm

Hi Aaron.
I saw the chip is 'SPI™-compatible, read-only format', maybe you must access it via bitbang rather than standard SPI.
Sorry I know nothing about Arduino.
But if you understand what the sketch does then should not be too hard to repeat it using the Bus Pirate.
In my opinion an easy way could be to digging the bus with a logic analyzer or something else like that.

Be seeing you.

Full Member
Full Member
Posts: 179
Joined: Wed Mar 14, 2012 4:09 pm

Return to Bus Pirate Support