Pot Commands


Closed Thread
Results 1 to 6 of 6

Thread: Pot Commands

  1. #1
    Join Date
    Feb 2005
    Location
    GREECE
    Posts
    120

    Question Pot Commands

    Hello boys&girls,

    I was working using a potetiometer conecting to my PIC16F628 via a capasitor to the GND.I want to read the resistor of a potetiometer(700ohm) whick included in an pan&tilt mechanism.I want to translate that to degree and display that on the LCD.
    I manage to do that but I have a problem translating the resistor-->degrees!!
    Range: 0-360
    Resistor : 0-700ohm


    Any idea??

    In adittion,if I use the internal oscillator of the 16f628 the pins15&16 goes to RA6&RA7 without any additional command?

    Thanks
    Nikos

  2. #2


    Did you find this post helpful? Yes | No

    Default

    The POT command works between 0-255 when properly scaled so :

    x = POT Value * 141
    degrees = (POT Value * 141 / 100) . (POT Value * 141 / 10)

    This comes from 360º / 255 = 1.41...

    In order for this to work properly you must make certain you scale the POT command so that it reaches 255 at the very end otherwise the numbers will be off.

  3. #3
    Join Date
    Oct 2004
    Location
    Porto - Portugal
    Posts
    28


    Did you find this post helpful? Yes | No

    Default

    Hi

    In adition to what cocacolakid wrote and as in the PBP manual I think that using 700Ohm will be a pain in the ...

    They suggest to use something between 5k to 50k, I've already tried it with 1k pot and the results were not good.

    I think that one of the real experts ( Melanie, Darrel, Bruce ...) on this things had already wrote that the best results were achieved with pot greater than 5K. Run a search

    regards

    nomada
    nomada

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Wink

    i'm not an expert but it read the RC time so, it will be a perfect match of your resistor and your Capacitor.

    The logic will say ===> lower resistor + Higer cap = Higher resistor + lower capacitor.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Feb 2005
    Location
    GREECE
    Posts
    120


    Did you find this post helpful? Yes | No

    Red face

    Thanks boys for your usefull information.

    I will try to read the POT Value and as cocacolakid said the
    degrees = (POT Value*141)/100
    displaied on LCD.

    Cocacolakid,A GUESTION?For POT Value max = 255 how I should find the scale?

    Does anyone have an expirience using smaller R than the range of 5k-50k?
    I am going to measure a POT = 700Ohm

    Please any adittional information would be grate for me.

    Regards
    Nikos

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Look up the POT command in the manual. It has a really good description for setting the scale.

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. A/D, Pot, Input, A,B So lost now....
    By Helmutt in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th March 2008, 22:23
  3. Multiple Pot Commands
    By Forkosh in forum mel PIC BASIC
    Replies: 0
    Last Post: - 15th October 2007, 00:05
  4. Replies: 4
    Last Post: - 24th January 2007, 22:20
  5. pot controlled pwm -- help
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 29th January 2006, 12:29

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