Quote Originally Posted by astrosteve
Does anyone know the approximate delay in executing the POT statement? From the details in the manual, it appears as though the resulting value is a function of capacitor discharge through a resistor. Thus, there must be some timeframe involved to allow this to occur. Does anyone know how long I should allow for this to occur in a time-sensitive application?

thanks,

astrosteve
Steve,
I don't have my manual, but the pot command uses the RC time constant between charge and discharge (discharge and charge?) to affix an 8 bit number to the discharge time. As such, this is a variable time delay, and you can only plan for the longest possible delay. If this delay time is too long, you can reduce the cap value, or the pot value. It will reduce the usable range, but give you more time to do other things in software. I did an assembly routine that works on behind the scenes using interrupts. I used port B.0 and charged it to B+, set the interrupt and timer1 to start counting. When the pin went low, the routine stopped the timer, and flagged that it was complete. It was a simple thing to read that value out and take that variable for use at my leisure.
Hope this helps,
Ron