1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PIC Delay calculator

Discussion in 'Microcontrollers' started by wmmullaney, Jan 12, 2008.

  1. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    $ is the current address, it's explained in the MPASM/MPLAB helpfile.
     
  2. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    170
    Location:
    Toronto, Canada
    GOTO $+2 is a shortcut and can trip you up when you switch from 16F to 18F PICs.

    The $ is the current address and the +2 adds two to the current address and jumps there. It's a popular skip instruction.
     
  3. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    goto $+2 jumps forward 2 instructions;
    $ = program counter (where we are now)
    $+2 = program counter+2
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Just4Kason

    Just4Kason New Member

    Joined:
    Nov 8, 2009
    Messages:
    11
    Likes:
    0

    ic.
    but, i dun know how to do the calculation for this delay.
    no matter how i count, i still cannot get 0.5 sec.
    please teach me how to count it, in order i can create my own delay in the future.
    thanks for advance.
     
  6. ptal

    ptal New Member

    Joined:
    Feb 1, 2008
    Messages:
    2
    Likes:
    0
    Great Delay Calculator

    I've created some software that has a delay calcultor and cycle calculator. you can get it free from picokit.com

    [​IMG]

    The Software is called PicoFlow LT and has a number of features.
    If you can think of other tools I could include in this software then please let me know.

    Thanks,
    Phil
     

Share This Page