Pot reading jumping like crazy!!!


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by exelanoz
    A wall type plugpack or a benchtop powersupply?

    Have your tried buying another linear potentiometer?

    what about your LCD display?
    Start up pause?
    are you clearing the display or just writing over old values?

    I assume you have a PIC 16F84A with the appropriate powersupply, a crystal...an LCD and POT attached with 2 wires and a cap. Right?

    When you say it moves erratically, does it move 1 or 2 values up or down during idle? Or does it move in much bigger increments?
    1. I'm using a wall type plugback

    2. I have tried 5 different pots. all the same

    3. Here is my output for the lcd
    lcdout $FE, 1, "Damper Position", $FE, $C0, " ", dec dig3, dec dig2, ".", dec dig1, dec dig0, "mm"

    4. I am using a 4MHz crystal, and the pot connected with 2 wires only.

    5. The values change by 1-2 units out of 255 total units.

    Also, when I allow the program to run continuously, the value steadily drops until it levels off at a certain point, far from where it started.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default 5/255

    Quote Originally Posted by champion
    1. I'm using a wall type plugback

    2. I have tried 5 different pots. all the same

    3. Here is my output for the lcd
    lcdout $FE, 1, "Damper Position", $FE, $C0, " ", dec dig3, dec dig2, ".", dec dig1, dec dig0, "mm"

    4. I am using a 4MHz crystal, and the pot connected with 2 wires only.

    5. The values change by 1-2 units out of 255 total units.

    Also, when I allow the program to run continuously, the value steadily drops until it levels off at a certain point, far from where it started.
    Hi Champion,
    Do I understand this correctly, You are dividing 5 volts by 255 ?
    If so then each unit has a value of 0.0196078431372549019607843137254902, so if it only varies by 2 or 3 units,
    let's say 10 units just because math frightens me then variation =0.196078431372549019607843137254902. now factor in the inherent instability of the power supply's regulator, the terrific connections you get from the breadboards connectors, and if there are any air currents near your bench to cause variations in the temperature of any or all or this . . .<h3> MY POINT IS </h3>. . . . unless you have everything made into a solid block with constant temperature regulation and perfect power regulation then some variation is normal, I believe that was why sayzer told you to choose a smaller divisor like 30, then the variation would be less than 1 unit and you will not see it.
    JS

Similar Threads

  1. Using the Pot command.
    By timseven in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th August 2009, 21:23
  2. reading the value of a pot
    By studysession in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st February 2009, 10:45
  3. A/D, Pot, Input, A,B So lost now....
    By Helmutt in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th March 2008, 23:23
  4. Replies: 4
    Last Post: - 24th January 2007, 23:20
  5. pot controlled pwm -- help
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 29th January 2006, 13:29

Members who have read this thread : 0

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