Is there a function that counts how many ms since start?


Closed Thread
Results 1 to 2 of 2
  1. #1
    f18viper's Avatar
    f18viper Guest

    Default Is there a function that counts how many ms since start?

    Hello!

    I'm coding up an alarm clock and I was trying to find a nice way of doing software debugging that wouldn't hold up the cpu. I have 8 7 segment leds and if i do any kind of delay i'm sure i'd see the display blinking.

    What i want to do is whenever someone presses a button (time set or what-have-you) the time of the first press is stored (in mS). If another press within a designated timing constant, that press is disregarded.

    Arduino has this function called millis, that gives you mS since start of the program, and I was wondering if pbpro had anything similar. I did dig through the green book and google and couldn't find anything.

    Thanks for your time!
    -Paul

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644


    Did you find this post helpful? Yes | No

    Default

    Hi F18viper,

    In PBP there is no such a function that counts the ms that I'm aware of. What you can do is set a TIMERx interrupt and keep track of the time this way. You can place a counter in the interrupt routine and know how many times the interrupt routine has been visited.

    Robert

Similar Threads

  1. Help with a draft of a robóvia rf
    By cesar35 in forum mel PIC BASIC
    Replies: 39
    Last Post: - 1st May 2009, 16:11
  2. First timer...building a remote controlled vehicle
    By .n0rig. in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 9th February 2009, 03:44
  3. Pic16f84 and RC5 kode
    By terminator in forum Bluetooth
    Replies: 5
    Last Post: - 18th June 2007, 21:40
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Translation Problem
    By cyh_fax in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 23rd April 2007, 14:11

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