PAUSEUS Using a 16MHz Oscillator


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699

    Default PAUSEUS Using a 16MHz Oscillator

    Hi,

    I am sure this question or a similar one has been posted before, but I can't find it. I'm using a 16 MHz internal oscillator and according to the 2.60 PBP manual the minimum pause I can get is 5us. Now, to obtain a shorter delay the manual recommends using ASM....ENDASM. Can somebody enlight me on how to do this?

    Thank you,

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: PAUSEUS Using a 16MHz Oscillator

    Hi,
    At 16MHz one instruction cycle is 250ns. To get 1us delay you could do
    Code:
    ASM
       NOP
       NOP
       NOP
       NOP
    ENDASM
    Any longer and you'd probably set up a loop or use some other tricks.

    /Henrik.

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: PAUSEUS Using a 16MHz Oscillator

    Nice!

    Can I use this ASM code inside a IF....ENDIF condition? For example,

    IF something

    ASM
    NOP
    NOP
    NOP
    NOP
    ENDASM

    ENDIF
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: PAUSEUS Using a 16MHz Oscillator

    Yes, of course you can.

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: PAUSEUS Using a 16MHz Oscillator

    Thanks. I'll try that.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

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


    Did you find this post helpful? Yes | No

    Default Re: PAUSEUS Using a 16MHz Oscillator

    just think the IF ... ENDIF will take some time ... ( especially if "something" is a complex expression ) ...

    Alain
    ************************************************** ***********************
    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
    Jan 2007
    Posts
    78


    Did you find this post helpful? Yes | No

    Default Re: PAUSEUS Using a 16MHz Oscillator

    This might be a great opportunity to utilize an O-scope :-]
    Have fun!

Similar Threads

  1. Pauseus Doubt
    By gadelhas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st February 2012, 18:14
  2. LCD works at 4MHz, but not 12 or 16MHz
    By Max Power in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th June 2008, 01:23
  3. Pauseus
    By xobx in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th April 2008, 10:07
  4. PAUSEUS command
    By AndrewC in forum General
    Replies: 4
    Last Post: - 10th February 2006, 03:00
  5. Can anyone help at getting OWIn & OWOut to work @ 16MHz?
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th January 2006, 11:08

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