Timing verification.



THE BOOK of DT's INTERRUPTS is an organization of interrupt service routines and other works written by Darrel Taylor, RIP.

Interrupt routines are arranged per Darrel's original list. Darrel Taylor's Instant Interrupts are an extension of the work of Tim Box whom in October of 2002 wrote INT_CTRL.pbp

Many of the forum members felt this is a long overdue project.

THE BOOK of DT's INTERRUPTS
will be a valuable resource and a tribute to Darrel Taylor the "Fanatical Contributor".

THE BOOK of DT's INTERRUPTS is located at http://dt.picbasic.co.uk/

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511

    Default Timing verification.

    Hello folks,

    I would like to have a quick verifcation on a program, or is it me missing a link in my head?

    The following program uses a pauseus statement
    If I use Pauseus 1, it has 28 micosecond delay between spikes.
    If I use Pauseus 5, it has 28 Microsecond delay between spikes.
    If I use Pauseus 3, it has 30 Microsecond delay between spikes.
    If I use Pauseus 10, It has a 28 Microsecond delay between spikes.

    If I use a PAUSE 1 it has a 1 millisecond delay (which is good)

    I probably have a screw loose upstairs that is baffling me on this situaion, and I have not figured it out yet.


    Here is the complete code to simulate this senario:

    @ DEVICE PIC12F675,INTRC_OSC_NOCLKOUT,WDT_ON,PWRT_OFF,BOD_O N,PROTECT_OFF,CPD_OFF,MCLR_OFF

    CMCON=%00001000
    TRISIO=%00000000


    Loop:
    GPIO=%00000001
    GPIO=%00000000
    pauseus 1 'replace this with the numbers mentioned above
    GOTO Loop
    end
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  2. #2
    carl_schell's Avatar
    carl_schell Guest


    Did you find this post helpful? Yes | No

    Cool

    Hi Dwayne -

    I would guess it might be related to resolution. The pbp manual says thet the minimum delay for lets say a 4 MHz resonator to your pic is about 24 micro seconds....so when you ask for less...you are asking for too short of a pause....switching to a 20 MHz resonator should increase your resolution down to 3 micro seconds.

    Best Regards,

    Carl

    -------

    PIC Development Boards with bootloader
    www.schellelectronics.com

    Novi, Michigan, USA
    Last edited by carl_schell; - 31st August 2004 at 05:48.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    @ NOP

    Insert for 1uS Delay at 4MHz, 500nS delay at 8MHz etc etc.

  4. #4
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Carl and Melanie,

    Carl>>I would guess it might be related to resolution. The pbp manual says thet the minimum delay for lets say a 4 MHz resonator to your pic is about 24 micro seconds....so when you ask for less...you are asking for too short of a pause....switching to a 20 MHz resonator should increase your resolution down to 3 micro seconds. <<

    Thanks a million both of you. I guess I was assuming too much <g>. I knew there had to be something going on... I was up too late last night working on a stupid project... thank goodness there is not a time limit. <g>

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

Similar Threads

  1. 12F683 serout timing
    By Hobie Cat in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 21st December 2009, 16:57
  2. 18F2550 timing
    By sstt1976 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 22nd August 2008, 00:30
  3. Data verification
    By Daniel Simões in forum Serial
    Replies: 5
    Last Post: - 26th August 2006, 02:59
  4. Questions on timing
    By malc-c in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2006, 22:38
  5. HSEROUT buffering and timing - 16F88
    By picster in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 5th March 2006, 17:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts