Anonymous

Project:Sanguinololu Thermocouple: Difference between revisions

From London Hackspace Wiki
Line 131: Line 131:
[[File:MAX31855 memory map.PNG]]
[[File:MAX31855 memory map.PNG]]


<!--Sample code:
<code>
signed int getTemp(pSCK, pMISO, pCS) {
    unsigned char buffer[4];
    buffer[0] = shiftIn(pMISO, pSCK, MSBFIRST);
    buffer[1] = shiftIn(pMISO, pSCK, MSBFIRST);
    buffer[2] = shiftIn(pMISO, pSCK, MSBFIRST);
    buffer[3] = shiftIn(pMISO, pSCK, MSBFIRST);


    if(buffer[1] & 0x01) // error!
MAX31855 is somewhat backwards compatible with the MAX6675 however it is 32 bits instead of 16 bits. I shall test to see if this poses a problem.
    {
 
        // short to VCC
Have to take the "MAX6675_SS" lines from the RAMPS section of pins.h and transpose it to Sanguinololu section.
        // short to GND
 
        // open circuit
under <code>#define SDSS    31</code> write <code>#define MAX6675_SS    31"</code>.
    }
 
 


    return 0; // temperature
}
</code>-->


/Lines to change in Sprinter/Marlin/etc... /
/Lines to change in Sprinter/Marlin/etc... /