counter


Closed Thread
Results 1 to 3 of 3

Thread: counter

  1. #1
    Join Date
    May 2012
    Posts
    20

    Smile counter

    hi,can someone tell me how to use timer0 in pic16f628 as a counter.an example like counting the pulses of an inputed puls signal using timer0.

    thank you.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: counter

    I'm on cellphone, can't post details.

    Search here for DT INTERRUPTS, use that to make a 1 second timer, then count how many times the input pin goes high.

    Robert

    EDIT: For better sampling, use 60 sec timer and divide by 60.
    Last edited by Demon; - 2nd May 2012 at 20:50.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: counter

    code example, search for frequency counter, pulse counter, olympic timer etc.... even of grandpa 16f84 template are still valuable...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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