18FXXX = better code efficiency?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    thelightbrain's Avatar
    thelightbrain Guest

    Default 18FXXX = better code efficiency?

    Does PBP take advantage of the 18FXXX's bigger instruction set, and features like direct 8x8 multiplication? So that I will actually tend to have smaller and faster assembly code produced when using those chips?

    Or is PBP limited to the mid-range instruction set regardless of the target processor?

    I'm getting ready to port over from a 16F648A to a 18F2525 and I can't find any reference in the manual about this. Just curious -I know there are so many other advantages regardless.

    Thanks in advance.

    Jim

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Hi Jim,
    I don't know if it's mean something but i'm really disapointed about the test i just do. I compile a program use on a 16F877 wich was using 388 word of code space to a 18F452.... now using 722 Bytes of code space.

    My assumption, since 18Fserie are 8bits instead of 14bit (16f877) is that PBP will still use 14bits core limited instruction. In that situation, i think ther's many improvement to do by Melabs.

    i'll send e-mail to melabs and see what they do with this.

    regards
    Last edited by mister_e; - 2nd November 2004 at 21:29.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    After testing it with a program under 16f648 to migrate to 18f2525... really disapointed about.... twice the code space.

    It looks PBP doesn't really care about the 16bit instruction set. But there's maybe an setting to do before compile it... Maybe Melanie know how.

    regards
    Last edited by mister_e; - 2nd November 2004 at 22:10.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    Do NOT directly compare the PIC18-series reported compiled BYTES with the non-18 series compiled WORDS. They are NOT the same thing. You are not comparing like with like.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    "Do NOT directly compare the PIC18-series reported compiled BYTES with the non-18 series compiled WORDS. They are NOT the same thing. You are not comparing like with like."

    Thanks Melanie for putting lights on it. So as i can understand it will take about the same memory space at the end considering WORD compile/Bytes. Am i right on that?

    Can we assume that 18F2525 will run faster than a 16F648 for some task?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    When calculating properly, you will find on average the 18 series uses fractionally less codespace for the same functions. Quote:"16F877 wich was using 388 word of code space to a 18F452.... now using 722 Bytes" in this case 722 bytes is around 361 words.

    I have not compared PBP's 18 series MAC and LIB files against the 16 series to see if they are identical or not, however given the same oscillator speed and configuration, I would hope to find the programs executed similarly, otherwise you will not have a direct upward migration path and compatability. There are of course salient differences because the archetecture is diffent to allow for features like increased program memory, RAM, etc. and PBP does take advantage of that because otherwise it would not work on those PICs. So of course there have to be some differences.

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 08:42
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. Serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 94
    Last Post: - 25th February 2007, 13:33
  5. ds1307 from f877 to f452 not work
    By microkam in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th July 2005, 00:02

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