Is "PAUSE 0" a valid command


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2003
    Posts
    432

    Default Is "PAUSE 0" a valid command

    Hi All,

    Subject says it all really.

    I am just wondering if ZERO is a valid value for the PAUSE command or whether ONE is the minimum allowable delay.

    I want to have an adjustable delay whilst I develop some code so that I can slow things down to observe what is happening but I want to be able to run the code at as close to real speed as possible.

    I realise that if ZERO is a valid value it would still take a few microseconds to complete but that is still much faster than a 1mS delay.

    If ZERO isnt a valid value then I will use a GOSUB and have something like this...
    Code:
         Gosub WasteSomeTime
    
    
    WasteSomeTime:
         If DebugDelay = 0 then
              return
         Else
              PAUSE DebugDelay
         Endif
         return
    Thanks
    Keith

    www.diyha.co.uk
    www.kat5.tv

  2. #2
    Join Date
    Feb 2005
    Location
    Holmfirth England
    Posts
    116


    Did you find this post helpful? Yes | No

    Default

    Hi

    Pause 0 will work, I just looked on the scope with this code

    start:
    high pin
    pause 0
    low pin
    pause 0
    goto start

    the pin starts to go high but does not have time to get there before going low again, with a 20MHz osc it takes just a few micro seconds..

    Regards
    Bob...

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Excellent, thanks Bob
    Keith

    www.diyha.co.uk
    www.kat5.tv

  4. #4
    Join Date
    Jul 2006
    Location
    USA
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    I use a math equation for a PAUSE value on one of my designs and it works
    fine. The equation depends on a continously changing variable. Sometimes
    the result is 0.

  5. #5
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    If you need something quicker, you can use a PAUSEUS.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink Pulse wanted or not ?????

    Hi,

    Made some trails this morning ( 16F628 @4Mhz, internal Clock )

    While m_a



    outp = 1
    Pause 0
    outp = 0
    Pauseus 100


    Wend

    Result is a beautiful 18.2 ... µS High pulse. ( @ 4Mhz !!! ) ( The bypass .1µF cap effect clearly shown ...)

    as expected, it's not so far from Pauseus minimum duration ...

    Keep in mind this "Ghost" pulses can easily trigger an unwanted event ... an a special test on the 0 value might be added.


    Alain

    PS for Bob : you might give a cup of strong coffee to your scope ... reading a 2 or 3 µS pulse is not that difficult for my Hameg 203-4 ( a basic 20Mhz scope aged ... 20 years these days !!! )
    Last edited by Acetronics2; - 19th July 2006 at 12:41.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Feb 2005
    Location
    Holmfirth England
    Posts
    116


    Did you find this post helpful? Yes | No

    Cool

    Hi,

    Your right about the scope, it's a Fluke scopemeter 190C, and it has trouble keeping up with anything more than around 2 or 3V/uS voltage swing. Being a colour screen, it does make pretty red, & blue patterns when you try to make it work too fast, lol. But I wasnt far out saying a few uS at 20MHz oscilator.

    Regards
    Bob...

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Easy HID Command -Response application
    By ptig185 in forum USB
    Replies: 25
    Last Post: - 22nd September 2010, 19:56
  3. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  4. Can I do this???
    By noobie in forum mel PIC BASIC
    Replies: 2
    Last Post: - 10th June 2006, 18:57
  5. Interupts and Command string
    By Tissy in forum Serial
    Replies: 13
    Last Post: - 17th March 2006, 23:59

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