1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

About 500 kb program

Discussion in '8051/8951' started by Suj, Jul 13, 2015.

  1. Suj

    Suj New Member

    Joined:
    Jul 13, 2015
    Messages:
    4
    Likes:
    0
    My executable is about 500 kb, I do not know what kind of microcontroller is able to run it, please help. Thank you very much!
     
  2. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,170
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE
    Either you need to optimize, or move to a different micro.... The 8051 has a 16 bit address so the MAX addressable size is 64K...

    What makes the executable so large.... When I used to write LARGE programs on the XT PC I would be lucky to see 200K..

    If you create some sort of "Off chip" system for all the "constant data" will the exe be a smight smaller???
     
  3. Suj

    Suj New Member

    Joined:
    Jul 13, 2015
    Messages:
    4
    Likes:
    0
    Thank you very much. The calculation's complicity made my application so big. I have optimized it but got not much improvement. Would you please tell me what else MCU I can use for such kind of big program?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,170
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE

    What sort of calculations??? There are ways around certain mathematical calculations..
     
  6. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,170
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE
    The 32bit micro's will be the way to go... Huge calculations would probably be too much for an 8 bit..

    The pic32 has variants that can handle 2Mb of flash... But maybe a 16bit DSP ( 512kb ) would do....
     
  7. Suj

    Suj New Member

    Joined:
    Jul 13, 2015
    Messages:
    4
    Likes:
    0
    It is solving a ten variables non-linear equations using Newton's Iterative method as the derivatives are easy to calculate, and classic Chord method as its code simpler, both generates the executable of almost the same size. I do not know any other way better.
    I know very little about MCU and nothing about pic32 and 16 bit DSP. Would you please recommend some readings about them for me? Thank you very much.
     
  8. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,170
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE
    I can't recommend anything until I know what you are doing..

    How do you know the code size BEFORE compilation... Have you compiled this code in windows?

    Embedded code is tighter... Look over at MikroElectronica... They support MANY micro cores... Look at the math libraries to see if you can use their stuff... Loads of 32bit examples to view..
     
  9. Suj

    Suj New Member

    Joined:
    Jul 13, 2015
    Messages:
    4
    Likes:
    0
    Yes, I compiled and built it with code::blocks c++ compiler in my windows 8.1.
    I'm not quite understand the meaning of this statement, and do not know how tight it can be?
     
  10. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,170
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE
    Using C++ in embedded systems is an extravagance I rather not take.. The overheads outweigh the efficiency too much...

    Tight code!! Well very well optimized code... Embedded C tends to optimize to levels not seen on PC's..
     
  11. granddad

    granddad Active Member

    Joined:
    Jan 18, 2015
    Messages:
    750
    Likes:
    75
    Location:
    Worcestershire UK
    Perhaps a Microstick II DM330013-2 , it will support a range of MC mcu's 16 and 32 bit up to 256k code , just add MPLABX and toolchain . will get you started for little outlay.
     
  12. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,170
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE
    What is worrying is once he has a micro running with soo many calculations on a mere micro, I think speed will be an issue... A Pentium quad core 64bit ( probably running at 2.4Ghz).. vs a LPC or pic single core less than 200Mhz..

    Wouldn't bother!!!... I think you should be looking at a tiny PC 3,5" form factor... Or running it on a PI
     

Share This Page