POT command


Closed Thread
Results 1 to 3 of 3

Thread: POT command

  1. #1
    Join Date
    Jul 2009
    Posts
    6

    Question POT command

    I have been using the MicroCode Studio Help to get the Basic commands that are available.
    On of them is "POT" and it is supposed to work using "POT pin, scale, var.
    I tried to use it with the Pot on my PICkit2 with the statement
    POT PORTA.0,255,duty
    Duty is supposed to be something between 1 and 255.
    Anyone have any Ideas?
    Larry

  2. #2
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default POT Command

    I presume that you have a circuit with:

    1. A variable resistor, say 10k, connected to +5 Volts.
    2. A capacitor, say 0.1mfd, connected to the the other end of the variable resistor and ground.
    3. The wiper of the pot/variable resistor connected to pin A.0.

    'Duty' should be a BYTE sized variable.
    'Scale' is used to get the best results. Try Scale=127, to start.

    The value of 'Duty' will be proportional to the setting of the variable resistance.

    See page 118 of the PBP handbook

    Regards Bill legge

  3. #3
    Join Date
    Jul 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Thank you on the "POT" question

    Thank you Bill
    I was using the pot on the PICkit and I don't think it is wired that way.
    I'll use another 10 K variable resister and Capasitor connected to the board.
    Thanks again
    Larry

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 : 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