Timer using Picbasic Pro


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    Gothenburgh, Sweden
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Thanks for your fast reply.

    In my application I have a wheel that rotates from 2rev/sec up to 110rev/sec. The wheel has a sensor wich is activated during 180degrees of a rotation. So during the first half of rot I measure the time it takes to turn 180deg and during the second half I will send the values to the computer.
    So the measured times will be in range from 4,5ms to 250ms or actually 4500us to 250000us to get a good accuracy.
    I must measure every rotation because I use the values to calculate the acceleration of the wheel.
    I found an interesting post here: http://www.picbasic.co.uk/forum/showthread.php?t=2803
    I will try to use some of this code but I need to extend the time to measure.
    Is it possible to detect when the timer rolls over and then save the current values in a word and then reset the timer and continue to measure? In my VB application I can add the words togeather to get the complete time. If the timer ticks in 2us interval @ 20Mhz then I belive that I can get up to 65000 something units of 2us. Then I need only two words to store the time in to be able to measure up to 250ms. Am I right about this? Is it possible to do? If this works i hope that I can use two timers to measure two wheels at the same time.

    Best Regards
    Stefan.

  2. #2
    Join Date
    Jan 2005
    Location
    Sweden
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Hallå Stefan!

    Seems like it's a car/MC project.
    Laptimer with 0-100 (0-60 to our friends on secluded islands) "bragging rights meter"?

    Lycka till!
    Last edited by RRacer; - 10th April 2006 at 23:38.

Similar Threads

  1. can anyone here can convert this in picbasic pro?
    By reianjim in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd December 2009, 12:43
  2. Replies: 3
    Last Post: - 1st July 2008, 22:07
  3. How to configure SPI in PICBASIC PRO?
    By moogle in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th April 2007, 19:31
  4. Question for all that use MELABS PICBASIC PRO
    By oskuro in forum Off Topic
    Replies: 2
    Last Post: - 24th March 2005, 18:15
  5. PicBasic Pro & PicBasic syntax different
    By Billyc in forum General
    Replies: 5
    Last Post: - 16th April 2004, 22:19

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