PBP command execution time


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: PBP command execution time

    Hi,
    As Richard pointed out earlier, something like TRISA = %11111100 or PortA = %00000001 compiles to TWO assembly instructions:
    movlw low (0FCh)
    movwf TRISA
    each taking one instruction cycle. If the PIC is clocked at 4MHz, one instruction cycle is 1us so TRISA = %11111100 takes two us.

    The Goto MainLoop compiles to a bra instruction which takes two instructions.

    Your complete program executes in 14 cycles, or 14us at 4MHz.

    Then, as have also been pointed out, the compiler MAY inject a clear WDT instruction. Turn it off and tell the compiler to stop tickle the dog if you want to be sure.

    /Henrik.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: PBP command execution time

    Yup, I got those values also by highlighting from one point in a pass to the same point in the next pass. I couldn't point before the top TRIS, there's no pulse break to select. That's why I used after PORT instead, I can select it at the beginning and end of a pass.
    Name:  Saleae Charlie-plex 4 pins v2.PNG
Views: 517
Size:  76.4 KB
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Code speed and execution time
    By aajgss in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 12th May 2011, 04:44
  2. Code execution time?
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th February 2009, 17:07
  3. Execution time in programme
    By Adrian in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th November 2007, 23:29
  4. Command execution time
    By barkerben in forum General
    Replies: 2
    Last Post: - 7th December 2004, 21:29
  5. instruction execution time
    By tjg in forum Code Examples
    Replies: 3
    Last Post: - 21st April 2004, 19: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