-
POT command
I haven't messed around with it yet but what I want to do is create a reasonably precise set of time delays with a PIC.
I could program pins to do this as I only need several values but was thinking I bet I could do it with pot on a single input pin? (I've never used pot before)
What would be cool is if the trimmer had enough range, I'd like to jump in several 5 second increments.
Say, fully CCW = 15 seconds.
As you move the pot CW, there would be a trigger point for 20 seconds, the next 25 seconds and so on....till "whatever"....40 seconds or so.
As I fall into a range of values, an I/O pin would go high along with an led designating the delay time.
b0 = 15 secs
b1 = 20 secs
b2 = 25 secs etc
Feasible?
Can you in essence make "pot" sort of a precision pot?
Like....
If blah blah = a range of values then delay = 20 seconds
THANKS
-
It could be done, But I think you would be happier with a 10 bit ADC.
The pot as a voltage divider, no capacitors to mess with...measure the voltage, maybe even have a reference voltage to "tune" it.
The manual even says the values have to be experimented with when using POT command.
-
Yeah, I thought of that....haven't really done much with anything other than purely digital I/O stuff....it'll be fun to play with it.
Also thought I could use the internal timers someway...
Reset to zero every time it hits the maximum of 40 seconds and sample the timer in my loop, looking for a small range of values in the register that would denote 5 second increments?
Another possibility?
-
Drugs er bad, MMmK? Don't do drugs...
I'd go with the ADC, its easy to use, fewer parts, easier to scale.
just say no to POT.
-
I agree with mackrackit and Ryan7777. Use ADC capability; it is truly easy. I did a nice little thing with a 12F683 that reads three different pots for three different time values.
-