Skip to main content
Topic: BusPirate & SPI with MAX31855 Thermocouple (Read 1348 times) previous topic - next topic

BusPirate & SPI with MAX31855 Thermocouple

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]
  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);
  SPI.endTransaction();
 
  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?

http://http://www.adafruit.com/datasheets/MAX6675.pdf
Datasheet for you folks.


Thank you much,
--Aaron

Re: BusPirate & SPI with MAX31855 Thermocouple

Reply #1
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.

U.Sb