Chip Weller wrote: > By the way, the ADC method covered in AN512 doesn't strike me as > providing 16-bit result quality. If you are trying to create that sort > of resolution you probably are fooling yourself. > No, I don't think 16 bit resolution is realisticaly acheivable, the schmitt trigger in the PIC was never designed for this use and I suspect dosen't have terribly precise switching points. However, I am getting around 9 1/2 bits over the temperture range of interest (15 to 45 degrees C) which is more than adequate. Thanks for the tips on digital filtering, it's something which I would like to investigate further. Mike Keitz wrote: > This is a good idea. A little logic could be added to handle sudden > large changes in the input. If most of the samples are being rejected, > the rejection process should be bypassed until the average becomes close > to the new value. One simple technique would use a counter that counts > up when a sample is rejected and down if it is accepted. If the counter > rises above a threshold, start putting all samples into the average, but > process everything else the same. After enough new samples have been > averaged, the count will reduce below the threshold and the outlying > sample rejection will start working again. > Hmm..good idea, thanks Mike. Given another few days of continuous bashing of my head against the lab wall, I might have come up with this, you've maybe saved some pain :) Lawrence Lile wrote: The next thing to try might simply be analog filtering of your signal. Nyquist will tell you that you have to sample at more than twice the maximum frequency of interest, and it is a good idea to make sure that no frequencies above that are present. A couple of caps might just solve your problem adequately. Often we are looking for signals that change over seconds, and measureing them at megahetz. In this case a simple decoupling cap might be all that is needed. The trouble is, the adc technique outlined in AN512 tends to preclude the use of analogue filtering, adding a cap to the thermistor would just screw up the timing. You wouldn't have thought that the adc would be that prone to noise as it has a reasonable sized cap (440nF in my case) straight to ground on the sense wire. Goes to show I don't know what I'm talking about I guess! I have to agree with your comments on emulators and noise though. I guess it's time to get out the JW parts and see what's really going to be happening. For anyone using AN512 for tempertaure control, can I suggest that if the system is a closed loop, then the thermistor is linearised, either electronically or in software. I used an interpolated look up table and the loop stability was improved massively. Not surprising when you look at the thermistor characteristics. The slope at the lower temperature range was around 8 times that at the top end. Trying to tune the loop was a nightmare until that was sorted. Another hint, be carefull with emulators, the ICEPIC 2 can leave all the pic periperals running when the core has actually stopped (selectable option). Trouble is I didn't actually notice until my peltier cooler had reached about 145 degrees C. Strangely it seems to have lost a certain amount of efficiency :o). Regards Mike Rigby-Jones mrjones@nortel.co.uk