Dany It seems to me that you're getting the correct data, but not reporting the temperture correctly. For calculating the temperature, you must first convert the cold-junction temperature to voltage with the following diagram. For the ADC, you get values for the thermocouple measurement of about 7. You do have some noise, which might be from EMI pickup from the wires in the system. If you do get 7 as an output code, and are using the ±0.256V FSR this converts to: 7*7.8125uV = 54.68uV Then you use the internal temperature sensor and get the temperature. In your previous readings, you got 25.59°C (as an example). You then convert that temperature to a thermoelectric voltage through a k-type thermocouple table. This converts to 1.02415mV. Add this to the thermocouple voltage of 54.68uV. This becomes: 1024.15uV+54.68uV = 1078.83uV. Convert this back to temperature and you get: 26.938°C. Joseph Wu
↧