Go Down

Topic: Burning the bootloader on a Chinese Nano (Read 12265 times) previous topic - next topic

lesept

#15
Nov 04, 2017, 06:00 pm Last Edit: Nov 04, 2017, 06:01 pm by lesept
Yes, setting the programmer to Arduino as ISP and downloading using a USB cable gives the same result
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

Robin2

Sorry. I'm out of ideas.

Maybe look through the list of boards to find another type that uses the 168?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

lesept

#17
Nov 04, 2017, 09:45 pm Last Edit: Nov 04, 2017, 09:46 pm by lesept
It didn't work either... Anyway, thank you very much for your help.
I'll buy some new Nanos, they are not very expensive... And pay more attention to what I buy next time!
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

lesept

#18
Nov 04, 2017, 10:04 pm Last Edit: Nov 04, 2017, 10:38 pm by lesept
Robin, do you know this:
Code: [Select]
https://github.com/WestfW/OptiLoader
It says that it can find the type of CPU, in the following list: ATmega8, ATmega168, ATmega168P, ATmega168PB, ATmega328, ATmega328P, ATmega328PB

But Nick Gammon's board programmer says mine is an Atmega168PA: is it important? Does this prevent this Optiloader from working in my case?

EDIT:
Atmega168PA is supported by Optiloader but I still get the same error after burning and trying to upload the blink sketch...
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

Robin2

As I don't have any devices with any type of 168 I can't experiment on your behalf.

You need to find the datasheet for the 168PB and see what its signature bytes are. The datasheet I normally use only refers to the PA version.

I have recently had to compile a version of Optiboot for a special case. The details are in this Thread - if you feel like experimenting with that.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

CrossRoads

From the datasheet:
ATmega168P 0x1E 0x94 0x0B

Those are also the bytes you reported earlier.
Look at the chip - what is marked on it?

Select  a board like Promini with 168P as the board type for bootloading and programming.



Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

lesept

I beleive it 's : MEGA 168PA
second line : AU 1701

I'll ask ,y kids to confirm when they're awake...

I don't have a Promini, all I have is Nanos with 328 and a Uno R3.
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

Robin2

I don't have a Promini, all I have is Nanos with 328 and a Uno R3.
But the Arduino IDE does not know that and it may be perfectly happy with @AWOL's suggestion.

If I was in your situation I would try every suggestion I was given, however silly it might seem.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

lesept

Sorry, I didn't understand what he meant, I thought he said I needed to use a Promini.
So I tried to upload the blink sketch on NanoB using Promini/Atmega168 5V 16MHz options, but it leads to the same errors.

Then I chose Promini/Atmega168 to program the bootloader using NanoA and Gammon's board programmer. I get another kind of error here :
Code: [Select]
Arduino : 1.8.2 (Windows 10), Carte : "Arduino Pro or Pro Mini, ATmega168 (5V, 16 MHz)"

Le croquis utilise 10286 octets (71%) de l'espace de stockage de programmes. Le maximum est de 14336 octets.
Les variables globales utilisent 241 octets (23%) de mémoire dynamique, ce qui laisse 783 octets pour les variables locales. Le maximum est de 1024 octets.
C:\Users\Chuwi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\Chuwi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega168 -carduino -PCOM4 -b19200 -D -Uflash:w:C:\Users\Chuwi\AppData\Local\Temp\arduino_build_997042/Atmega_Board_Programmer.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Chuwi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x4f
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x70
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x69
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x4c
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x6f
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x61
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x64
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x65

avrdude done.  Thank you.

Une erreur est survenue lors du transfert du croquis
Bibliothèque non valide trouvée dans C:\Users\Chuwi\Documents\Arduino\libraries\arduino_sketches-master : C:\Users\Chuwi\Documents\Arduino\libraries\arduino_sketches-master
Bibliothèque non valide trouvée dans C:\Users\Chuwi\Documents\Arduino\libraries\arduino_sketches-master : C:\Users\Chuwi\Documents\Arduino\libraries\arduino_sketches-master

Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.


I'll try using the regular ArduinoISP sketch
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

lesept

#24
Nov 05, 2017, 12:22 pm Last Edit: Nov 05, 2017, 12:50 pm by lesept
I have a question about how to connect the two boards:
I followed the instructions from this site:
Code: [Select]
http://www.instructables.com/id/How-To-Burn-a-Bootloader-to-Clone-Arduino-Nano-30/
it says to connect pin 1 of the ICSP to pin 12 of working board, and pin 4 of ICSP to pin 11 of working board.
In my case this leads to:
MISO ICSP of NanoB to MOSI of NanoA & MOSI ICSP to MISO of NanoA?

Is this correct? I think I have seen on Nick Gammon's site that the connection was MOSI to MOSI, MISO to MISO. Which is the correct one?
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

Robin2

#25
Nov 05, 2017, 03:01 pm Last Edit: Nov 05, 2017, 03:02 pm by Robin2
Is this correct? I think I have seen on Nick Gammon's site that the connection was MOSI to MOSI, MISO to MISO. Which is the correct one?
This is correct.

Which system were you using when Nick Gammon's programmer was working for you? That was the correct version :)

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

lesept

#26
Nov 05, 2017, 08:12 pm Last Edit: Nov 05, 2017, 08:23 pm by lesept
I think I did it the other way round: MOSI <--> MISO
I'll try again by exchanging the wires and connect MO(I)SI(O) to MO(I)SI(O) ! :)

Everytime, I used NanoA to program NanoB
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

Robin2

I have my programmer sitting beside me on the table and it is wired MOSI to MOSI

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

lesept

It's not working when wired like this. I get on the console the error message:
Code: [Select]

Atmega chip programmer.
Written by Nick Gammon.
Version 1.37
Compiled on Nov  8 2017 at 21:47:08 with Arduino IDE 10802.
Attempting to enter ICSP programming mode ......................................................
Failed to enter programming mode. Double-check wiring!
Type 'C' when ready to continue with another chip ...
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

Robin2

It's not working when wired like this.
I can't see what "this" is.

Make a very clear drawing (pencil is fine) showing the exact connections you are using and post a photo of the drawing.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up