Go Down

Topic: Help Replacing Buttons with IR Remote Control (Read 15006 times) previous topic - next topic

6v6gt

I suggest making a separate thread:
"Problems installing optiboot bootloader on a Nano"
in the forum "Installation & Troubleshooting".
It is a common enough activity. Give details like which tutorial you followed, what error messages you saw etc.

Dancopy

Hi 6v6gt

I don't tell you much, but using the sketch 'Atmega Board Programmer' I ended up burning (died) my Arduino Nano! RSRSRS

Do you know if it is possible to find on ebay (or on another site), Arduino Nano with Uno Bootloader?
(precisely for this purpose)

Thanks

6v6gt

Here is an example of an eBay retailer with Nano preinstalled with optiboot.
Remember when you are loading a sketch to it, you select UNO as the board type, not Nano.


https://www.ebay.com/itm/Arduino-Nano-v3-ATMega328P-2019-16Mhz-Optiboot-Bootloader-and-CH340-USB-Cable/123931927925

Dancopy

#33
Dec 10, 2019, 02:44 am Last Edit: Dec 10, 2019, 02:45 am by Dancopy
Hi 6v6gt,
On this site, this Arduino Nano is more expensive than Uno! How can this be?

"Remember when you are loading a sketch to it, you select UNO as the board type, not Nano." - That's why I burned (let it die) my Arduino Nano. I did not know!

Hugs friend

arduarn

"Remember when you are loading a sketch to it, you select UNO as the board type, not Nano." - That's why I burned (let it die) my Arduino Nano. I did not know!
I don't think that selecting the wrong board type when writing your sketch to the Nano could have "burned" it. Why do you think the Nano is burned?

If you can no longer upload a sketch to the Nano, then open the preferences window in the Arduino IDE and tick the "Show verbose output during: upload" checkbox. Try to upload again and then post the output in the black messages part of the IDE window (on many PCs you can click in the black area, Ctrl-A, Ctrl-C, and then in the forum post Ctrl-V (preferably in code tags or as a quotation)).

Dancopy

Hi arduarn!
First, thanks for your patience (yours and 6v6gt) with me.
Yes, my Arduino Nano literally burned! There was a little smoke and a strong burning smell of the component.

So, I used another Arduino Nano ...
I installed Minicore to make a few more attempts but the result is this:

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C: \ Users \ Daniel \ AppData \ Local \ Arduino15 \ packages \ MiniCore \ hardware \ avr \ 2.0.3 / avrdude.conf"

Using Port: COM4
Using Programmer: arduino
Overriding Baud Rate: 19200
avrdude: stk500_recv (): programmer is not responding
avrdude: stk500_getsync () attempt 1 of 10: not in sync: resp = 0xf8
……….
……….
avrdude: stk500_recv (): programmer is not responding
avrdude: stk500_getsync () attempt 10 of 10: not in sync: resp = 0xf8

avrdude done. Thank you.

Error writing bootloader.


I set it up like this:

Board: ATmega328
Clock: 16 MHz external
BOD: BOD 2.7V
LTO Compiler: LTO disabled
Variant: 328P / 328PA (also the 328PB)
Bootloader: Yes (UART0)


I connected the 6 Arduino Nano ICSP pins to the Arduino Uno.

I programmed as "Arduino as ISP" and Write Bootloader.

Dancopy

I re-booted the Bootloader on Arduino Nano through the Programmer: Arduino ISP; the end of the recording was OK but the results of the sketches I am sending you in a .txt attachment for being a bit big.

I made a comparison with two sketches: the basic example 'Blink' and my intended sketch 'Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino'.

So you draw a conclusion.

Note: Blink loads and works normally.

Thanks again,

Daniel

Dancopy

One more proof that the Bootloader is recorded and the same size as Arduino Uno Flash memory: Flash memory size = 32768 bytes.

File in attachment

arduarn

One more proof that the Bootloader is recorded and the same size as Arduino Uno Flash memory: Flash memory size = 32768 bytes.

File in attachment
I'd say that Bootloader.txt indicates that you haven't successfully burned the Uno bootloader yet:

Quote
Bootloader is 2048 bytes starting at 7800
The Optiboot bootloader should only be 512 bytes.

The output you posted before:

Quote
avrdude: stk500_recv (): programmer is not responding
avrdude: stk500_getsync () attempt 10 of 10: not in sync: resp = 0xf8
suggests a problem with the Uno you are using as the programmer, either with the Arduino ISP sketch that it runs, or maybe the wiring.
Please take another look at the tutorial and ensure you are doing things correctly.

What currently happens when you try to burn the Uno bootloader as suggested by 6v6gt? Please post the output.

6v6gt

Post a link to the tutorial that you followed to install the optiboot bootloader on the Nano.

There is definitely a mess somewhere and it is not clear to me if the dumps are from the Nano or from the Uno which you are using temporarily as a programmer.

From your last post, this is very odd. The dump contains the statement:

Bootloader is 2048 bytes starting at 7800

but only 512 bytes of the 2kB block appears to have data, the rest is marked with 0xFF.

Dancopy

Hi 6v6gt! I keep thanking you and arduarn!

The page is this: https://www.instructables.com/id/How-To-Burn-a-Bootloader-to-Clone-Arduino-Nano-30/

I just burned a new bootloader for you to see the result.

I did exactly as it is written in the tutorial.

Dancopy

EDIT:

Sketch "Digital_Clock_MAX7219_DS1307RTC_3button" loads normally and sketch "Digital_Clock_MAX7219_DS1307RTC_3button_V0_02 (with IR_Remote) show this in the end:


Writing | ################################################## | 100% 4.89s

avrdude: 31378 bytes of flash written
avrdude: verifying flash memory against C: \ Users \ Daniel \ AppData \ Local \ Temp \ arduino_build_881846 / Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.hex:
avrdude: load data flash data from input file C: \ Users \ Daniel \ AppData \ Local \ Temp \ arduino_build_881846 / Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.hex:
avrdude: input file C: \ Users \ Daniel \ AppData \ Local \ Temp \ arduino_build_881846 / Digital_Clock_MAX7219_DS1307RTC_3button_V0_02.ino.hex contains 31378 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.71s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x7800
          0xff! = 0x8a
avrdude: verification error; content mismatch

avrdude done. Thank you.

the serial port selected does not exist or your card is not connected

6v6gt

#42
Dec 12, 2019, 05:32 am Last Edit: Dec 12, 2019, 10:14 am by 6v6gt
Ok. So post #40 appears to indicate that you successfully installed the optiboot bootloader somewhere on the "Nano". However, did you  select the uno board type when you were doing this? You must do this and it differs from the "instructable" which you said you followed. The high fuse with value 'DA' tends to indicate you didn't.

Did you then:
1. Connect the "Nano" directly to the pc via the usb cable.
2. Select the standard "Uno" board type. (You now treat your "Nano" as a Uno in the IDE.)
3. Attempt to verify then upload your sketch onto the "Nano"

If you did all that, then it is difficult to know what to suggest. The dumps from post #37 and #40 imply that the fuses are set to indicate a 2kB bootloader but that should have been corrected with the installation of the Uno optiboot which uses only 512 bytes. Avrdude is a tool for examining the fuses.

A similar issue is also discussed here: https://forum.arduino.cc/index.php?topic=620086.0

Dancopy

Ok friend, you said, "However, did you select the one board type when you were doing this?"

Yes, first I chose the Arduino Uno board to record the Arduino ISP sketch and then the Arduino Nano board with the Programmer: "ArduinoISP" to record the Bootloader.

You also said: "You must do this and it differs from the" instructable "which you said you followed."

What did I do different from the tutorial?

I know I'm already boring you about this, so here I ask you one question for one last try:

Is it possible to reset (fully clean) the Arduino Nano to do the Bootloader procedure again? Well, maybe it got corrupted - what do you think?

If so, could you send me any tutorials about it?

Thank you again

6v6gt

I have highlighted the single important difference. The rest is exactly as in the tutorial:

Quote
STEP 3 - Burn Bootloader

- Keeping all the wires intact and unmoved in step 2, connect the working arduino back to the computer with the USB

- Go to Tools>Serial Port>COM (and make sure again that the correct COM port is chosen - ask me if you don't what this means)

- Go to Tools>Board>Arduino Nano w/Atmega 328 (this time we choose the non working arduino, in my case nano atmega 328)

- Go to Tools>Board>Arduino/Genuino Uno (this is the difference to the tutorial!!!)


- Go to Tools>Programmer>Arduino as ISP

- Go to Tools>Burn Bootloader (this is it, after the LEDs stop flashing your board is ready to use !!!)

.

Do all of the above steps in ORDER !!! no skipping steps

Always make sure that the correct COMM port and correct board are chosen before uploading a sketch to avoid errors...

When you later load sketches on to the updated device, always treat it as an Arduino/Genuino Uno [NOT as a Nano] in the IDE.

Go Up