pic18F code size problem???


Closed Thread
Results 1 to 3 of 3
  1. #1
    dogi's Avatar
    dogi Guest

    Unhappy pic18F code size problem???

    Hi!
    Can anybody tell me why the compiled code size of the same program is double size when i compile it for PIC 18F452 vs. PIC16F877?? For example, i wrote a program and compiled it first for 16f877, and it was 7,6kB. Because the program wasn't finished yet i've decide to use pic18f452 which has double program memory size to fit into it. And when i compiled the same program for the new pic the code size was 14,2kB. ??????? I don't understand this. Is this normal?? What am i doing wrong?? Please help!

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


    Did you find this post helpful? Yes | No

    Default

    hehe, i already think it too.

    Here's the explanation.

    16F compile WORDS of codes
    18F compile BYTES of code

    So if you get a 7000 words of compile code with a 18F... divide it by 2 to get the real space it takes 3.5k.

    see this thread
    Steve

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

  3. #3
    dogi's Avatar
    dogi Guest


    Did you find this post helpful? Yes | No

    Talking

    Thanks a lot!!
    This solves all my problems.

Similar Threads

  1. 16f887 44 pin demo board code problem?
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th December 2008, 14:17
  2. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  3. problem with my code
    By civicgundam in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd February 2008, 01:52
  4. PIC18F got some weird problem?
    By NatureTech in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 19th February 2007, 16:18
  5. Servo Code problem
    By ALFRED in forum General
    Replies: 1
    Last Post: - 2nd March 2006, 03:30

Members who have read this thread : 1

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