Jump to content
43oh

Recommended Posts

Would be interesting to see what numbers you're getting, but in either case, try this sketch to dump the raw output:

#include <SPI.h>

#define CS 18

void setup() {
  Serial.begin(115200);
  SPI.begin();
  pinMode(CS, OUTPUT);
  digitalWrite(CS, HIGH);

  Serial.println("Begin...");

  delay(500);
}

void loop() {
  byte b;
  int i;

  Serial.print("Reading MAX31855: ");
  digitalWrite(CS, LOW);
  for (i=0; i < 4; i++) {
    b = SPI.transfer(0);
    Serial.print(b, HEX);
    Serial.print(' ');
  }
  Serial.println();
  digitalWrite(CS, HIGH);

  delay(2000);
}

I can't recall the maximum SPI speed supported by the MAX31855, but if all else fails, SPI.setClockDivider(SPI_CLOCK_DIV16) should force it down to 1MHz I believe.

Link to post
Share on other sites
  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I think it's the pinMode() functions in the constructor. The GPIO peripheral modules haven't been activated by the time the C++ constructors execute so those pinMode's put the MCU into the Bus Error

@@Chuckymonkey - Try this little "patch", it's a zip file with 2 files that need to replace some files under Energia's install root (C:\energia-0101E0013 or wherever)   E13_cc3200_ctors_fix.zip  

It's almost like the chip is quitting.  If I unplug the sensor from the chip and then plug it back in it'll work, otherwise it just reads nothing.  What I mean by that is that it'll work for a little while and then it won't, if I remove the 5V it'll register the same as if I had not done anything.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...