> Rochester, 25 februari 2006. > > Dear Tia, > > It is likely that you'll have to "massage" your input signal to comply > with the requirements of the A/D input pin: scale down the voltage, > and possibly use an OPAMP to increase impedance (see a previous > discussion about this on this same list). What is more relevant is the > frequency of your signal: if it is too high, the A/D converter will be > too slow to convert it. With the AC transformer I assume you're > measuring a 50 Hz signal, which should be no problem for any PICmicro > with A/D converter. It's not "no problem", it will be ok, but there is not a lot of margin, here is why: Tacq= Aquisition time= 20usec n= Number of samples for good waveform display = 100 f= Frequency= 50hz, but for rectified ac it is actually double = 100 1/100 = 0.01 (T= 1/f) 0.01/Tacq = 0.01/20u = 10/20m= 0.5k= 500 namely, we should be able to obtain 500 samples per waveform on screen, which is very good quality. But you can see that if you increase your frequency to 500Hz, you are approaching the limit. > > Displaying the result on an LCD is a different story, but at 50 Hz > should certainly be possible. Most graphical LCD don't have a fixed > response time, so they might "hang" for a while occasionally as you > write to them. An interrupt buffering the A/D conversions is a > solution there. > > Greetings, > Maarten Hofman. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist