Nano with Mega168PA

Hi all! First post here, despite following the forum for a long time.

Recently I bought a couple of Chinese Nano clones with 168PA in them for some small projects. All I need is to flash some LEDs, so I think the 168, having less RAM/FLASH/EEPROM but costing a bit less should not be a big problem at all and justify saving some money.

Just to be surprised that these Nanos is a bit slow to boot, taking +/- 2 seconds to start my sketch.

After a bit of fruitless googling, I would to ask you, experienced guys, if there is a better bootloader for these µC and if it's possible to burn it using another Arduino as ISP and, in this case, how to do it.

I think if I select, in the IDE, the Nano with Atmega168 as a target it will burn the same slow bootloader?

If you use Arduino as ISP you can program the Nano with no bootloader, only the sketch.

But, did you test the bootloader behaviour with a simple sketch like Blink, instead of your code?

Hi, @anon57585045, thanks for your repply!

Yes, I tested it with blink and have the same behavior.

I know I can use it without bootloader, but I would like to keep the possibility of upload new code through USB in the future, so my interest in trying another bootloader, if possible.

There are other bootloaders out there. Have you Googled?

Have you tried uploading a sketch without a bootloader? Just to be sure there is no hardware problem on the boards? Such as a slow reset circuit...

OK, I didn't test upload code without a bootloader.

And yes, I googled and read about OptiBoot, but I can't understand how to burn it instead of the one that is bundled with IDE.

You can use an Arduino as a programmer and program another microcontroller. If you program only your program without a bootloader on the other microcontroller, then you have all the memory and your program starts faster.

install MCUDude's "Minicore", and use it's "burn bootloader" command (after setting the Board to ATmega168 and properly connecting/setting some sort of device programmer.)

(The oldest bootloaders do take several seconds to run the sketch after a reset or powerup.)

1 Like

Hi, @westfw! Thank you for your suggestion! I didn't know about MiniCore and it was exactly what I was looking for!

I successfully burn its bootloader and achieved the instant boot keeping the possibility of sketch update using USB.

Fantastic work by MCUDude.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.