Get elapsed time while TIMER samples pulses


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    >>to make accurate calculations like pulse rate

    Many PICs have capture modules that capture the time between incoming rising (or falling) pulse edges. Look at the datasheet for your PIC and see if it has this capability. These modules are relatively easy to setup (and work great).
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  2. #2
    Join Date
    May 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    Paul, I'll have a look for that at the datasheet.
    By the way I plan to use a 16F628A. Im my desktop I have 8 16F628A's, some 16F876A, 16F877A, 18F252, 18F4550, 18F4685, 12F509, and planning to get a 18F4431 or 2431, which have hardware built-in QEI pins (Quadrature Encoder Interface), 8 14-bit PWM modules (thru RB & RD ports), I know those monsters are made for what I need, but I think there's still a chance with theese theese brave warriors and polular PIC16F628A's.

    Thank you Paul,

    Watching datasheet,
    RodSTAR

  3. #3
    Join Date
    May 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default possible solution

    now I am self suggesting,
    maybe is it possible to use different timers?
    for example
    1)start TMR0 to measure time
    2)start TMR1 to count pulses
    3)process other things while TMR0 and TMR1 measure in background..
    4)stop TMR0 to measure time
    5)stop TMR1 to count pulses
    6)get measured time from TMR0
    7)get counted pulses from TMR1

    maybe an advanced user may help me

  4. #4
    Join Date
    Jan 2009
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    rodstar,do u has code for your solution..

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 17:39
  2. Totally Baffled with Elapsed Timer
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th June 2008, 21:01
  3. Count pulses between VARIABLE TIME
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th October 2007, 12:44
  4. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

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