pauseus behaviour, 18f2455


Results 1 to 5 of 5

Threaded View

  1. #1
    mark_wotton's Avatar
    mark_wotton Guest

    Default pauseus behaviour, 18f2455

    Hi,

    I'm having a strange problem with inconsistent timing using pauseus. I wrote the following test program:

    Code:
    define OSC 08
    osccon = %01110010
    
    for i = 1 to 10
     high statusled
     for j = 1 to X
       pauseus Y
     next j
     low statusled
     for j = 1 to X
       pauseus Y
     next j
    next i
    and tested it, substituting for the following X,Y pairs

    1000,5000
    2500,2000
    5000,1000
    10000,500
    25000,200

    For Y=2000 and above, I get exactly what I expect: an LED flashing
    once a second for 10 seconds. For lower parameters to pauseus, however
    i get the following results:

    1000,5000 -> 10s
    2500,2000 -> 10s
    5000,1000 -> 5s
    10000,500 -> 2.6s
    25000,200 -> 1.0s

    pauseus is meant to work down to 12 us for my 8mhz clock, according to
    the PicBasic manual: can anyone suggest what might be wrong, or what
    tests I might run to narrow it down?

    Mark
    Last edited by mark_wotton; - 7th September 2006 at 11:46. Reason: formatting fix

Similar Threads

  1. PICs can do more if use others than delays instructions
    By hardcore in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th February 2010, 19:52
  2. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 18:51
  3. RC5 decode on a 10F + Question
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 11th September 2008, 08:20
  4. LANC code 12F675
    By MikeDD in forum General
    Replies: 4
    Last Post: - 9th May 2008, 05:44
  5. reducing shiftout clock freq and PS2/PC interfacing ....
    By wireless magic in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 26th February 2008, 20:15

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