This demo interfaces a K-Type Thermocouple (MAX31855 breakout board) with a mbed (NXP LPC1768). A LCD (uLCD-144-G2) is used to display the temperature. The mbed uses the SPI interface to communicate with the thermocouple board. Below is a simple program
If your temperature reading is inverted, you might have your K-Type wire plugged in the opposite way.