PBP2.50b and POT command problem ?


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default PBP2.50b and POT command problem ?

    Hi

    I'm trying to use the pot command in order to read 8 switches
    I have put 8 different resistors in serie with a pushbutton
    and as described in the pbp manual 100nf to ground

    Then to test I took a 47K pot with 100nf and the following code
    but regardless off the value (128) i can see the var changing to 128 max and then it goes back to 0 even if I still continue increasing or decreasing the resistance value

    tried 220nf and 10nf the change the time constant with no result

    anyone who can reach a full 0-255 range with 47K pot and 100NF ?

    define OSC 20
    'PORTD
    ' Define LCD registers and bits
    Define LCD_DREG PORTD
    Define LCD_DBIT 4
    Define LCD_RSREG PORTD
    Define LCD_RSBIT 2
    Define LCD_EREG PORTD
    Define LCD_EBIT 3

    b0 var byte


    loop:

    pot portc.7,128,b0
    pause 50
    Lcdout $fe, 1 ' Clear screen
    Lcdout #b0
    goto loop

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    And you've tried changing SCALE in the POT command? Or used the example code in the book to find the optimal SCALE value?

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Put a PAUSE 1000 before goto. Increase PAUSE 50 to PAUSE 200

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. POT command
    By Michael in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th December 2008, 22:33
  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, 22:23
  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