Can't get POT work on P12f675 - Newbie


Results 1 to 7 of 7

Threaded View

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


    Did you find this post helpful? Yes | No

    Talking Was a pretty good question ....

    Quote Originally Posted by berslan View Post
    Come on guys, did I ask such a stupid question that has to be ignored?
    Hi,

    Yes and No ...

    If you had read your Datasheet ...you could have noticed that GP3 is not a pin like the others ...

    BUT, in your favour, you are not to know how "POT" works ...

    So, just remember POT needs the pin to turn from time to time into an OUTPUT ...

    And this is written nowhere in the manual ...

    The Proof :

    Code:
    POTT    movwf   RM1             ; Save bit mask
            call    HIGHT           ; Set pin high to charge cap
            movlw   10              ; Charge cap for 10ms
            call    PAUSE
            movf    RM1, W          ; Get bit mask
            iorwf   INDF, F         ; Set pin to input
            bcf     FSR, 7          ; Point to port
            xorwf   INDF, F         ; Flip bit to low
            clrf    R0              ; Zero counter
            clrf    R0 + 1
    potloop bsf     FSR, 7          ; Point to TRIS
            movf    RM1, W          ; Get bit mask
            xorwf   INDF, F         ; Set pin to output
            CLRWDT?NOP		; Discharge a little (& clear Watchdog timer)
    Alain

    Change pin used ... no other solution ( ... RCTime won't work either )
    Last edited by Acetronics2; - 26th March 2008 at 12:44.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Newbie needs help with POT...
    By greenflight in forum General
    Replies: 3
    Last Post: - 29th August 2007, 01:39
  2. Replies: 4
    Last Post: - 24th January 2007, 22:20
  3. pot controlled pwm -- help
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 29th January 2006, 12:29
  4. Replies: 4
    Last Post: - 8th September 2005, 15:42
  5. Pin RA4 doesn't work
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 15th July 2004, 12:03

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