On Thu, 29 Jan 1998 13:04:02 -0600 Amey Deosthali writes: >> You can run most of the pic's at higher speeds and they usually work >> okay with no errors, >> but.... you have to heatsink them or you might let the smoke out. > >Wow! Is the heat dissipation so high? No, it isn't. The PIC will just malfunction above a certain speed; it won't be damaged. > >I think I am not really clear about the working of the 16C71 A/D. >According to what I understand there are two separate timings to take >care >of -- acquisition time and conversion time. Right? Suppose I want to >sample an analog signal at 8Khz. So I want the A/D to take a sample >every >125us and convert it. I can control the conversion by the GO/DONE bit >(bit2 in ADCON0). How do I control the acquistion? The converter works (I think) by first charging a network of capacitors to the input voltage, then measuring the charge in each one as it is discharged. When you select a channel (all the input pins go through an analog multiplexer, then to the single ADC), the capacitors start charging. They have to be allowed to charge for a certain time in order to equalize to the voltage at the input. This is the acquisition time. When the GO bit is set, they are disconected from the input and the charge measured. The discharging sequence is controlled by the A/D converter clock and must be in the proper range to get an accurate conversion. The time required is the conversion time. If you only have one channel, just set the GO bit at regular intervals. Be sure the time between when the conversion is done and the next one starts is long enough to meet the acquisition time (i.e. sample period > acquisition time + conversion time). I want the A/D to >convert the sample which is taken every 125us. Do I do it by turning >the >ADON (bit 0 in ADCON0) bit on/off. No, leave this bit on all the time the converter is in use. If you aren't going to use the converter for a while (or not at all), turn it off to save a little power. > >What I was thinking of was to program the timer to give an interrupt >every >125us. The ISR just needs to read the ADRES register (getting the result of the last conversion), then set the GO bit to start the next one. This will convert the same channel over and over at regular times. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]