Accurate Freq Measurment


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    May 2011
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Accurate Freq Measurment

    Hi,

    I've read the great advice and example code here during a search of PIC period measurement. I'm in the process of using a PIC 18F2431 and using C.

    Not being an expert with PICBasic, could I ask what PIR3.1 refers too from the example given above?

    Code:
    Capture VAR PIR3.1
    Thanks in advance, David.

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


    Did you find this post helpful? Yes | No

    Default Re: Accurate Freq Measurment

    Hi,

    "C" ... What is "C" ...

    is there anything called "C" somewhere ????

    has "C" ever existed ???

    Just open your pic datasheet, interrupts flags section ... you'll find it.

    BTW : VAR ... just means " other name for " ( something like # DEFINE ... Ooops ... )

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Accurate Freq Measurment

    PIR3.1 is bit #1 in the PIR3 register. Capture VAR PIR3.1 just creates an alias for this interrupt flag bit.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    May 2011
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Accurate Freq Measurment

    Quote Originally Posted by Bruce View Post
    PIR3.1 is bit #1 in the PIR3 register. Capture VAR PIR3.1 just creates an alias for this interrupt flag bit.
    Many thanks Bruce that makes it perfectly clear.

    @Alain Thanks too. Apologies for mentioning the "C" letter BTW!

    As for the RTFM thing. Please, it's a cop out. It's the easiest thing in the world to belittle someone for not finding the information (or quite understanding how to frame a question) you may think should be obvious, but in the context of the wider picture may not be to the person asking the question. And of course the "Problem" may only be one of several or several tens that the poster may be concurrently dealing with at the time of the question.

    Sorry Alain, I really don't mean to appear to be negative after you've been kind enough to reply to my question, it's just that RTFM is so often used to limit learning, not encourage it.

    So yes, I see now that Section 10.2 (Page 102) "PIR Registers" of the data sheet provides the information for the code I was referring to. That's one problem down...many more to go.

    Thanks again for your inputs. David.

Similar Threads

  1. Easy and Accurate Clocks without RTC IC
    By paul borgmeier in forum Code Examples
    Replies: 18
    Last Post: - 28th October 2013, 21:28
  2. reducing shiftout clock freq and PS2/PC interfacing ....
    By wireless magic in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 26th February 2008, 20:15
  3. accurate vref < 1vdc 16F876 comparator
    By mslaney in forum Schematics
    Replies: 1
    Last Post: - 23rd March 2005, 01:44
  4. HPWM on a 628 is not changing freq.
    By dtit in forum General
    Replies: 2
    Last Post: - 25th February 2005, 09:34
  5. More accurate resolution from the A/d converters
    By pjsmith in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th August 2004, 22:49

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