MegaLoad U | Beta tester needed

Author admin    Category All projects     Tags

I just finish a new version of MegaLoad,  It's name is MegaLoad U  for Universal.  You will be able to use old and future devices without upgrading MegaLoad U.  It not compatible with the old bootloader files.  You need the bootloader that came with MegaLoad U.  It's a first release so please be cool with me!  So I'm waiting for your beta testing…

No longer support for Megaload


MegaLoad U


83 Comments to “MegaLoad U | Beta tester needed”

  • admin September 6, 2011 at 12:09 am



  • Ronaldo September 9, 2011 at 6:06 pm

    has only one error

    # ifdef INTVECREG
    MCUCR = (1 <<IVCE); no error  here," IVCE symbol is not defined."
    MCUCR = 0×00;
    # endif

    I have a doubt in the above function, the Bit IVCE was moved to left for MCUCR. after this, load 0×00 to  MCUCR. . this is correct?  which options below should set MCUCR
    Table 35. Interrupt 0 Sense Control
    ISC01 ISC00           Description
    0          0                    The low level of INT0 generates an interrupt request.
    0           1                    Any logical change on INT0 generates an interrupt request.
    1           0                   The falling edge of INT0 generates an interrupt request.
    1           1                    The rising edge of INT0 generates an interrupt request

  • Sylvain September 9, 2011 at 6:09 pm

    What is your MCU,  The interupt level is not the good thing, it's there to set the interupt vercor 

  • Lefebvre September 11, 2011 at 12:34 pm

    Cela fonctionne-t-il avec une liaison 1 wire ?


  • admin September 11, 2011 at 1:01 pm

    Pas du tout, seulement port serie

  • Ronaldo September 15, 2011 at 8:37 pm

    Dear admin,
    My MCU is Atmega32

  • NC October 7, 2011 at 11:11 am

    Hi admin, I wonder what does the NSHIFTPAGE do??
    Why need to shift this?
    I'm using atmega8, facing problem on placing the data block into correct address

  • admin October 7, 2011 at 12:25 pm

    Check in the datasheet it’s how many byte you must shift to address the corect page address, I’m not sure but in megaload there is a exemple of what to do


  • HuyNX October 12, 2011 at 5:45 am

    @NC: Look at the datasheet of atmega8, Figure 103 on page 215, you will see how  page address and word address of one page. And Table 84 on page 221 show bit corresponding in Z-register. Page address is 7bits (in the Z-register its Z12:Z6) – so that you must shift by 6 (NSHIFTPAGE) from RealPageAddress

  • wellcom November 2, 2011 at 1:34 pm

    tell me please how to use a bootloader to Atmegi 128? Something must be received by the firmware USART. thank you

  • Chau March 9, 2012 at 4:40 am

    I used Megaload to take bootloader atmega128, it is very good but when i built device over 58% full my device cannot work. Please help me!!!

  • admin March 16, 2012 at 4:36 pm

    Did you modify to set for a M128 in the asm file the .S file

  • Alex May 4, 2012 at 7:16 am

    I used Megaload to take bootloader atmega128,
    when i set the pagesize 256, (#define PageSize   256)
    it doesn't work.

  • admin May 4, 2012 at 12:24 pm

    Did you make the apropriate modification in the .S file?

  • Alex May 4, 2012 at 1:36 pm

    yes i did. modified as fellows:
    i find the problem at the function of wrteFlashPage(),
    if( CheckSum!=RxChar()) return 0;
    when write the Page#1,i will be check error.
    some guys also report the same question,such as Neophonixe Sep 18,2010.
    may be it have some bug in MageLoad U, when set the pagesize 256.

  • admin May 4, 2012 at 1:47 pm

    Maybe there is a problem, I never try with 256k flash,  If you find the error please let me know


  • Alex May 4, 2012 at 2:04 pm

    I used Atmega128  128k flash, not 256k flash.
    i think the main problem may be at  the flash page wirte checksum.
    i test the code, when set the pagesize =64 or 128 , it checksum all right, but when set 256, check will not pass.
    i doen't have the code of MageLoad U, so i can't make it right,
    i hope you can solve this problem by yourself, if it is necessary i can provide my bootloader code for you to test. thinks for your nice code and software! 

  • robikovax December 6, 2012 at 4:00 pm

    I succesfully installed the bootloader .hex, and the program download works fine, but the MCU didn`t start the program after reset. It runs only after programming. I use ATmega16.
    How can i set up the autostart? 

  • admin December 6, 2012 at 4:05 pm

    Check the fuse bit to enable the bootloader start and set the good bootloader size

  • robikovax December 6, 2012 at 5:26 pm

    Solved. My fault, excuse me…

  • Jens January 30, 2013 at 11:12 pm

    I want to use this on my ATmaga2561. So I change to #include "iom2561v.h"
    With this I´m confused, because there is a warning with RAMPZ, because this is defined in the include file. What should I do? Rename RAMPZ in the main.c?
    What is right for NSHIFTPAGE @ ATmega2561 and in assembly.s, what should I do with:
    SPMCR = 0×57   ; SPMCR for write

    ELPM_INST = 1  ; Check if your MCU have ELPM opcode

  • admin January 30, 2013 at 11:17 pm

    I don’t have the answer, and I no longer support Megaload (I’m too busy)

  • Heydar March 6, 2013 at 9:42 am

    I am using atmega16 and megaload u start flashing but never stops and when I open Monitor it keeps printing >>>>>>> now what did I do wrong?

  • admin March 6, 2013 at 11:15 am

    It’s look like your mcu still reset after bootloading

  • Heydar March 7, 2013 at 8:17 am

    Hi again
    I tested these things:
    1.tryed to put a blink in a pin inside a bootloader program.turn an led on in the begining and off at the end(before  #asm("jmp 0×0000")) and it worked well
    2.tryed to put a blink in a RxChar function on in the begining and off before return.again it worked
    3.then I sent a '<' (0×60) char to the micro with a terminal program.It returned a SBmc1! and led stoped blinking(still in RXChar).
    Any Idea about that?

  • admin March 7, 2013 at 3:59 pm

    Did you use the serial port in your software?

  • Heydar March 9, 2013 at 5:30 am

    Yes, 8bits odd parity 1 stop bit 9600kbps internal RC oscilator 8MHz

  • Sylvain March 9, 2013 at 12:16 pm

    Internal OSC is not good for serial comm  the speed could be offset

  • Heydar March 9, 2013 at 12:22 pm

    You are right but why is the output section of monitor in Megaload displays nothing?
    And i tried with both Megaload U and Megaload .the first one did nothing but said flash started and second one showed a > in input section and then start sending page one

  • MRH July 10, 2013 at 4:18 am

    Dear admin
    thanks for site
    Can I use megaload for ATxmega32A4 , if yes
    can you advise me about it
    best regard
    MR Hashemi

  • admin July 14, 2013 at 4:08 pm

    Megaload don’t work with the xmega

  • Umer July 24, 2013 at 1:58 pm

    @Mr Hashemi,
    You can use USBasp programmer with PDI support to program Atxmega32a4.

  • admin July 24, 2013 at 2:00 pm

    No Xmega

Post comment

Please note

All my source codes were taken from my personal projects.

Everything is for your information only. The C/C++ codes have been written
with ICCAVR. You can find the header and source CRT files by downloading their compiler.

All is for your information and everything is AS IS without any warranty of any kind. No other files are available and I don't make any modification for any body.



Electronic Links


AGC Anemometer AVR AVR Bootloader Bootloader Capacitence Capacitor Clock Color Control DCC Debugger Devices Digital driver Function Generator High Gain Microphone Humidity Inductance Inductor Laser LCD LED 3W Library Lightning Detector MegaLoad Meter Moodlight Mood Light MS5534 Nixie OscilloScope projector Rain Fall Sensor rgb RGB LED Scop Sensor SHT75 Temperature Terminal Tipping Bucket Train Modeling Vintage Water Detector