POT command


Closed Thread
Results 1 to 6 of 6

Thread: POT command

  1. #1

    Default 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

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    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?

  4. #4
    Join Date
    Sep 2006
    Location
    Indiana, USA
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    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.

  5. #5
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    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.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    One of my favorites
    http://www.rentron.com/PICX2.htm
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Using the Pot command.
    By timseven in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th August 2009, 20:23
  2. PBP2.50b and POT command problem ?
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th October 2008, 17:14
  3. Replies: 4
    Last Post: - 24th January 2007, 22:20
  4. pot command
    By lerameur in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 25th November 2006, 04:12
  5. Can I do this???
    By noobie in forum mel PIC BASIC
    Replies: 2
    Last Post: - 10th June 2006, 18:57

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts