Hi. I know how to upload the new bootloader to an Arduino Nano V3. Is it also possible to upload the old bootloader to a Arduino Nano V3 that has the new bootloader installed by default?
I am asking since one of my projects does not work anymore on the Arduino Nano V3 clones that have the new bootloader installed by default and I want to try out, if the issue related to the bootloader.
Using ICSP you can install what ever bootloader that will work with your processor. Use a programmer like USBASP or another Arduino running the ArduinoISP sketch.
It should be; just select processor -> old bootloader and do a burn bootloader. You need a programmer or use another Arduino as the programmer but you have that experience already.
The bootloader should however not affect your sketch so I think that you're barking up the wrong tree.
Thanks for your suggestions. The very same code runs fine on the Arduino Nano clones that were shipped with the old bootloader, but don't work anymore with the Arduino Nano's shipped with the new bootloader; that's why I wanted to check this out.
I get the following error when trying to burn the old bootloader using an Mega 2560 as ArduinoISP:
avrdude: AVR device initialized and ready to accept instructions
Error while burning bootloader.
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
avrdude done. Thank you.
What does "don't work" mean? Does the code have compile errors? Post the errors. If it compiles, what doesn't work? What does the code actually do? How is that different form what it should do?
Again, the bootloader should have no effect on compilation or code execution. Read through the thread that I linked in reply #2.
I am trying to run the Plipbox project to my newly received Arduino Nano V3 clones. It's an Ethernet adapter for the Commodore Amiga's parallel port. I previously built some of these Plipboxes which all worked fine until I got these "new" Arduino Nano V3's (with new bootloader and the CH340 without external crystal). I don't compile the project, I am using the pre-compiled HEX file from the project site above. The upload process just works as usual (by using the new bootloader with avrdude). But when trying to use the Plipbox on my Amiga, it just doesn't work; it does not make any connection to any servers, getting timeouts.
Thanks for the post you linked, I stumbled over this some hours ago, but I will re-read now.
I now have added ATmega328PB support to my avr-gcc and also to avrdude according to these instructions. I also adjusted the Makefile accordingly (with atmega328pb as MCU) and re-compiled everything successfully and used m328pb in avrdude to upload the resulting HEX file. Unfortunately it still doesn't work. I will investigate further tomorrow. Thanks for your help so far!
@groundFungus / @Juraj : I also flashed the MiniCore boot-loader to one of my Arduino Nano's; I think successfully, since it double-blinks every second. How do I have to upload the HEX (did not found any instructions for this) ?
You will have to recompile once (to get a new hex file) and do an upload with "Show verbose output during upload" (under file -> preferences) once (which will give you the command that you can use). After that it should be the same as what you used to do.
From where did you get this "Nano V3" ? An ATmega328pb chip is not usually found on Nanos and there are significant differences between that and the normally used ATmega328p (without the trailing b).
Moreover, I have written a small program that prints out the SIGNATURE_0, SIGNATURE_1 and SIGNATURE_2. As I understand, the SIGNATURE_2 defines the product in the particular chip family. I get 0x0F for them as well, so should be an ATmega of type M328P and not M328PB.
I then desoldered the MCU from the Arduino and replaced it with one of the MCU from the working Arduino's and the project (Plipbox) runs just fine. So that means, that indeed something with the MCU is different and not any other parts of the MCU. But what?
Is there any sketch/program that prints all available information about the used MCU to the serial monitor or something similar so I can compare the working with the non-working Arduino?
Alas, not quite true. The "signature" reported by the bootloader during an upload is just a constant compiled into the bootloader code, not the actual chip signature. Similarly, the SIGNATURE_* values are constants defined by the compilation of the sketch, rather than the actual chip (based on which chip you TELL the compiler you are using.)
It was at one time (before miniCore existed) a popular strategy to load ATmega328 chips that people had bought accidentally and load them with a 328P bootloader, after which the IDE wouldn't notice the difference, and since the 328P and 328 are very, very, similar, everything in the normal Arduino world would work fine.
The 328PB and the 328 are also pretty similar (the PB has additional functions, but you don't need to use them.) I'm surprised that you have a sketch that apparently fails to work on a 328PB (even if it was compiled for a 328P.) It woulc be "interesting" if you could narrow down exactly what it is that isn't working.