On Wed, 6 Jul 2005 12:21:13 +0100, you wrote: >As suggested, I've had a bit of a read up on the application notes for M= AX197. This is very purpose built IC and would be perfect (although it h= as 8 different channels and I only need 1), but looking at the prices fro= m RS, it's a bit impractical to use (=A320 for one IC!) shame. > >However, this set me wondering - IIRC (I am a newbie don't forget) there= are some PIC's with built-in ADC's could I not use one of these instead?= or am I missing something? I think for 0.5C accuracy, I need a minimum= of 10-bit ADC. Although I only want a temp range of 0C to 100C. I coul= d transform and scale the voltage to get better accuracy from 8-bit? > >I know I have to produce a reliable 1-2mA fixed current for the RTD's ex= citation current. Any suggestions on how I should do this would be welco= me. > >I assume I can then map the voltage reading back to the resistance (with= some calibration factor applied?), and have the standard PT100 resistanc= e table for lookup and interpolation. To do PT100 on the PIC ADC, the best way is with an external dual opamp.=20 V+---Rlimit--A--PT100--B--Rref -----Ground Rlimit sets the current - around 220R. RRef is a precision low-TC referen= ce resistor - value depends on temp range required, e.g. 1K opamp configured as a differential amplifier with inputs A,B producing am= plified voltage across the PT100. Gain about 5, depending on temp range required.=20 opamp configurted as unity gain buffer from B to VRef of the ADC.=20 This provides a voltage proporitional to the exitation current, so your A= DC reading is directly proportional to resistance, with no need for a constant current source as= the effect of supply voltage, and change in current with PT100 resistance are both cancelled o= ut. I have an excel spreadhsheet somewhere to help evaluate the effect of var= ious component values With a 10 bit ADC, my application did about 1 degree accuracy from -90 to= +180 - you could get better if your range is lower.=20 As the PT100 curve is not far from linear, you can use a fairly small loo= kup table with linear interpolation. A table in 10 ohm steps gives a maximum error of less than= 0.05 deg.C from -100 to +350 deg.C 5 ohm steps gives better than 0.01 degree error. Unless you're= into serious ADCs these errors are dwarfed by other factors. >I assume there are some PICs that can perform floating-point arithmatic?= Or do you rely on the 'C' compiler to provide the functionality? (neve= r used the PIC 'C' compiler before, although I do know 'C'). You don't need floating point as the range is limited. Just scale it up &= use fixed-point. =20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist