trying the pot command to control delay


Closed Thread
Results 1 to 3 of 3
  1. #1
    reddogtj's Avatar
    reddogtj Guest

    Question trying the pot command to control delay

    Can anyone help? I'm using a pic 16f84a to control some relays. I want to have a variable delay using a pot. This is what was programed

    POT 1,255,B0
    Let B1 = B0 * 1000
    pause B1

    I was thinking that the pot val B0 would be multipled by 1000 (1sec) and end up being anywhere from 0 to 255 seconds worth of delay (or pause) Well, it only gives me from 0 to a little more than 1 second worth of delay.
    I'm new to this and am a loss. Is this the wrong way to go about this? Please help!! Can you pont me in the right direction?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    POT is one of those commands you have to experiment with depending on your values of R and C.

    For example, in one design, to get a span of approximately 0-255 into my variable I use...

    POT WLTimer,95,DataA

    For this particular Scale value, I was using a 10K preset and a 100nF Capacitor (the same ultra-cheapo Y5V dieletric Capacitors that are used for decoupling the PIC).

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink

    Hi, red Dog ...

    The POT command works well only @ 4 MHz, with 0.1µF and 5 to 50 kohms...

    further trials could show you the 0 -255 result range is a view of mind, linearity is also only acceptable within a limited range.

    If you want fine results, try to use RC Time ...as Melabs recommends !!!

    Alain

Similar Threads

  1. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 07:57
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. RF Transmitter
    By et_Fong in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2005, 16:34
  4. Memory Space of the PIC16F84...
    By Tear in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 1st July 2005, 19:55
  5. Problem with saving to EEPROM...
    By Tear in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st July 2005, 00:10

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