Routines efficiency per second


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007
    Posts
    65

    Default Routines efficiency per second

    One thing is just program your ideas into the code. But if your application involves realtime response having complex computations, you may find some interesting problems.

    We all know real MIPS in a PIC18 or PIC16 is it's MHz divided by 4.
    Example: a PIC18 running at 40 Mhz runs at 10 MIPS (Million Instructions Per Second).
    Why I say this.

    I want to know how many microprocessor instructions takes a PBP statement to run.
    So, my question is if, is there any list or table that provides this information.
    Example: to know how many CPU instructions do statements take to run as SIN, COS, SQR, DIV32, LCDOUT, UART commands, HPWM, variable assigning, worst case 8-bit, 16-bit, 32-bit math operations, array accessing, reading writing, blabla, comparing, etc... and every statement we use to create our routines.

    My aim is to calculate to get how many times per second a given piece of code will be executed, considering best and worst cases

    Thanx in advance.
    Last edited by RodSTAR; - 26th November 2009 at 17:32.
    "Beethoven had his critics too, see if you can name 3 of them"

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    No tables, but you can measure the time fairly easily.
    http://www.picbasic.co.uk/forum/show...72&postcount=2

    Or some people prefer to simply toggle a pin and read it on a scope.
    <br>
    DT

Similar Threads

  1. Dallas CRC8 Routines
    By Tom Estes in forum Code Examples
    Replies: 23
    Last Post: - 8th May 2018, 18:07
  2. Darrel taylor 18F452 interrupt routines
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st April 2007, 06:17
  3. Microchip Floating Point Routines
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th October 2006, 19:51
  4. picbaisc pro compiler routines "question!"
    By moud_man in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd September 2005, 14:33
  5. DIV32 instead of floating point routines?
    By Tomasm in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd April 2004, 07:50

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

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