a simple boxe timer (code included)


Results 1 to 25 of 25

Threaded View

  1. #17
    Join Date
    Jun 2008
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    i'm new to picbasic.

    i didn't know that the "select" statment is so faster and smaller than many "if then" compiled in picbasic [realy i did not look at the select statment ... i've just used the first think i know in picbasic]. it was my mistake that i does't look at the beutiness of my code... even in functions where performance are not needed (like the selection of the time).
    i've just share my code.
    anyway, thank for suggestions.
    any other suggestion will be apriciated.

    p.s. is this code more faster? (no IF needed)

    LOOKDOWN2 W0,>[255,242,218,192,166,144,124,105,80,59,49,40,0],B0
    LOOKUP2 B0,[60,600,180,120,60,60,40,30,20,15,10,45,30],timerAc
    LOOKUP2 B0,[60,180,60,60,60,30,40,30,20,15,10,15,15],timerBc
    LOOKUP2 B0,[6,1,2,3,4,5,6,7,8,9,10,11,12],timerN
    Last edited by hozone; - 20th June 2008 at 21:14.

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 17:39
  2. Replies: 5
    Last Post: - 24th February 2009, 18:55
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. Interrupt/timer not really interrupting...
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd May 2005, 22:05
  5. Timer Accuracy
    By GEEZER in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st March 2005, 05:26

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