Timer - pause? ..?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default thetime var word

    max number of pauses will be 65535. so with pause 100 max time will be 6553.5 seconds or just under 110 mins. for longer times use a longer pause, for better accuracy use a smaller pause. it would also need a line in gettime to make sure it doesn't overflow.
    Last edited by nomad; - 3rd December 2007 at 13:43. Reason: oops

  2. #2


    Did you find this post helpful? Yes | No

    Thumbs up now that I'm home

    This will be more readable:
    Code:
    loop: 
    button portb.0,1,255,0,but1,0,loop
    
    gettime: 
    pause 100 
    thetime = thetime + 1 
    button portb.0,1,255,0,but1,0,gettime
    
    flash: 
    for blink = 1 to thetime 
    high portb.1 
    pause 100 
    next blink 
    low portb.1 
    goto loop

  3. #3
    Join Date
    Jul 2007
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Ok but I doesnt understand this line :/

    button portb.0,1,255,0,but1,0,loop

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    PBP Pro manual, page 47.

    All parameters explained

    Ioannis

Similar Threads

  1. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 07:28
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 16:23
  3. Replies: 11
    Last Post: - 12th July 2008, 03:36
  4. Fade out LEDs question
    By Sam in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd June 2008, 11:50
  5. Help Quick Need to make code smaller
    By Programmednew in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th January 2005, 04:46

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