Page 1 of 1

Thermocouple with MAX31855

Posted: Sat Jun 15, 2013 9:47 am
by Gimbal
Hi, has anybody work with the MAX31855 SPI and Rambo, looks straight foward to configer it as MAX6675, but when i check on adafruit they have two different library for them and RepetierMax using Arduino SPI library.
Will investigate this and post back.

Anders

Re: Thermocouple with MAX31855

Posted: Sat Jun 15, 2013 10:12 am
by Gimbal
So 2560 SPI are taken by LCD, 32U2 SPI are free, do not know if its usable.

Re: Thermocouple with MAX31855

Posted: Sat Jun 15, 2013 11:33 am
by Polygonhell
Gimbal wrote:So 2560 SPI are taken by LCD, 32U2 SPI are free, do not know if its usable.
The SPI is actually used by the SDCard, you can share it, you just need to assign a different ~CS line.
I believe repetier already has some code In it to deal with a MAX6675, the megatronics board has one on it.

Re: Thermocouple with MAX31855

Posted: Sat Jun 15, 2013 1:08 pm
by Gimbal
Hm, think i can use sensorpin as CS:

#ifdef SUPPORT_MAX6675
if(act->sensorType==101) {
WRITE(SCK_PIN,0);
SET_OUTPUT(SCK_PIN);
WRITE(MOSI_PIN,1);
SET_OUTPUT(MOSI_PIN);
WRITE(MISO_PIN,1);
SET_INPUT(MISO_PIN);
digitalWrite(act->tempControl.sensorPin,1);
pinMode(act->tempControl.sensorPin,OUTPUT);
}
#endif
}

Re: Thermocouple with MAX31855

Posted: Sat Jun 15, 2013 4:33 pm
by Gimbal
So i guess i have to piggyback the SPI connector and use SP0 as CS

// 101 is MAX6675
#define EXT0_TEMPSENSOR_TYPE 101
// Analog input pin for reading temperatures or pin enabling SS for MAX6675
#define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
// WHich pin enables the heater
#define EXT0_HEATER_PIN HEATER_0_PIN
#define EXT0_STEP_PIN E0_STEP_PIN
#define EXT0_DIR_PIN E0_DIR_PIN

Will give it a go