> Lile, thanks for the info you sent.
>
> > 1. You can't really use high impedance signals with this technique.
> >
> Should be OK here, thermistor is around 10K.
>
> > 2. You need error checking/correction in your code
> >
> Trouble seems to be that adding extra code into the loop for error checking
> slows the loop down and effectively cuts the resolution of the converter.
>
> > 3. This circuit is not very noise immune. I ended up learning a
> > lot about software noise immunity techniques.
> >
> Yes, I have discovered this the hard way. I pointed an acusuing finger at
> the guy who did the layout for our development board, and he turned around
> and said "fix it in software" ! The worst thing is trying to use an
> emulator. The long ribbon cable effectively couples edges from all the
> other port pins into the RA4 input and worsens the noise problems
> considerably. However, it still works and seems tobe far the best way to
> debug (if you can afford it).
>
> > 4. The schmidt trtigger input IS there for a reason. The schmidt
> > trigger input will trip at a more precise level than the other
> > inputs, and will give a better level of noise immunity. You'll find
> > higher variation in trip level from part to part in the standard port
> > inputs.
> >
> I understood this, what I didn;t understand it why the port wasn't read
> directly. I've since learned that it was because of hardware differences in
> the lower end 16C5X chips that were used in the App note.
>
> I have since made the thing work pretty well just by reading the RA4 line.
> It seems very reliable, but of course, there is noise present that needs to
> be filtered.
>
> > 5. Consider some kind of software noise immunity. The technique I
> > used was a median filter. I would clear out a section of RAM, take a
> > measurement, sort it into the RAM array, take another measurement,
> > sort it into the array, until I had an array of 10 or 12 measurements
> > all in sorted order. The middle one is the median, and that is the
> > result.
> >
> If this better than just using a circular buffer and calculating the
> average?
>
> > 6. I will give you a couple of samples of code for the median filter,
> > if you promise to get a SINGLE measurement working first. It sounds
> > to me like some kind of simple but oh-so-maddening hard to find bug
> > in the code
> >
> Very maddening. But mostly, due to not having used PICs before and not
> knowing about their habits, like the read-modify-write hassles. I think it
> didn't help writing the code in C, it kinda separates you from the hardware
> that bit more, although it's nice when it comes to do 16 and 24 bit math.
>
> The CCP module is still giving me grief, even with the duty cycle set to
> about 75% (as shown by the emulator) the output seems to latch high
> sometimes. I just know that this is going to be so obvious when I find it,
> but a phrase about woods and trees springs to mind at the minute.
>
> Mike Rigby-Jones
>
mrjones
spam_OUTnortel.co.uk
>
>