PIC12F683, POT & RCTIME not supported?


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2013
    Posts
    1,078

    Default PIC12F683, POT & RCTIME not supported?

    Hello.

    I want to read value of potentiometer into that MCU. here's sample code.

    Code:
    RC var GPIO.0
    test var gpio.5
    RESULT VAR WORD
    
    :mainloop
    HIGH RC
    PAUSE 1
    pot RC,100,result
    pulsout test,result
    goto mainloop
    the all hook-up is done according to manual. But it does not works, I've hooked oscilloscope to test pin - see no pulses here when I adjust pot.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: PIC12F683, POT & RCTIME not supported?

    I've looked with scope at POT pin too, there are fixed pulses, about 84hz frequency, and they don't change when I rotate the pot.

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


    Did you find this post helpful? Yes | No

    Default Re: PIC12F683, POT & RCTIME not supported?

    To be known ...

    POT only works "correctly" @ 4 Mhz and using the components shown in the Holy manual.

    Now, having a Chip with onboard ADC ... it's a shame and a nonsense using such an awful command ( not linear, need special value components ... )

    RCTime works perfectly ... but, here again, response is not linear and the range it must be used calculated with care to get enough granularity ...

    Alain
    Last edited by Acetronics2; - 5th June 2013 at 12:12.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  4. #4
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: PIC12F683, POT & RCTIME not supported?

    I tested RCTIME with my components on basic stamp 2p module, and it works perfectly, with nice linearity. Tried to move parts and code into PBP - does not works.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: PIC12F683, POT & RCTIME not supported?

    with nice linearity
    sure !!!

    LOL ... I didn't know capacitor charge or discharge was showing something linear

    Have a nice evening.
    Alain
    Last edited by Acetronics2; - 5th June 2013 at 18:33.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  6. #6
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: PIC12F683, POT & RCTIME not supported?

    Think what happens when you connect two unlinearities

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: PIC12F683, POT & RCTIME not supported?

    Quote Originally Posted by CuriousOne View Post
    Think what happens when you connect two unlinearities
    it's you who has the problem to generate your pulses ... not me ...
    ************************************************** ***********************
    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 " !!!
    *****************************************

  8. #8
    Join Date
    Jun 2013
    Posts
    1


    Did you find this post helpful? Yes | No

    Default Re: PIC12F683, POT & RCTIME not supported?

    I had a problem with RCTIME. Suggest you add a pause after rctime. It gives processor time to finish rctime before moving onto the next line of code.

Similar Threads

  1. PULSIN & RCTIME resolution calculation
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th January 2010, 14:34
  2. POT and RCTIME instructions
    By ruijc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th November 2007, 15:47
  3. can someone help me with RCTIME
    By gandora in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 17th May 2007, 00:30
  4. Using ADCIN or POT/RCTIME?
    By TonyA in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 16th April 2006, 18:37
  5. I'm getting strange Results using POT or RCTIME on PortB (or GPIO Port)
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 15th July 2004, 20:01

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