Steve,Originally Posted by astrosteve
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
Bookmarks