[Tutorial] How to burn 1Mhz & 8Mhz bootloader using Arduino IDE 1.6.5-r5
-
@flopp A pro-mini can do this if the fuses are set properly (when powering via Vcc for instance). If you power the Pro Mini via the "raw" pin, then power passes through the on board power regulator first, and this one will not allow 1.8V as far as I know.
-
@flopp A pro-mini can do this if the fuses are set properly (when powering via Vcc for instance). If you power the Pro Mini via the "raw" pin, then power passes through the on board power regulator first, and this one will not allow 1.8V as far as I know.
@GertSanders
Good to hear. I will reply how it went -
@flopp look for messages on power saving on pro mini on this forum.
-
Thank you for the tutorial. Quick question: Is it possible to just take the Atmega 328 chip with the freshly flashed bootloader, and just stick in in the Arduino Uno to program a sketch?
-
Thank you for the tutorial. Quick question: Is it possible to just take the Atmega 328 chip with the freshly flashed bootloader, and just stick in in the Arduino Uno to program a sketch?
@drock1985 I think I have done just that. It only needs to have a bootloader (you could just flash one there though).
-
Awesome @LastSamurai thanks.
One other question: Is it possible to just use a standard USB to FTDI converter to flash the sketch? Ex: flash bootloader using an Uno, then install in a SlimNode and use the FTDI connector there to flash?
-
Awesome @LastSamurai thanks.
One other question: Is it possible to just use a standard USB to FTDI converter to flash the sketch? Ex: flash bootloader using an Uno, then install in a SlimNode and use the FTDI connector there to flash?
@drock1985 Yes once it has a bootloader that should be possible (you need to use the right settings though ;) )
-
@drock1985 Yes once it has a bootloader that should be possible (you need to use the right settings though ;) )
What settings would those be? Would they be things outside of the tutorial?
Sorry to ask so many questions. Never flashed an Arduino before outside of connecting a USB cable to an Uno or Nano
-
What settings would those be? Would they be things outside of the tutorial?
Sorry to ask so many questions. Never flashed an Arduino before outside of connecting a USB cable to an Uno or Nano
@drock1985 Mainly the baudrate but if you just burn the standard e.g. Arduino Uno bootloader and then use the IDE with the Uno settings everything should work fine. If you encounter errors you can still check your settings ;) They are in the boards.txt file of the IDE.
Just try it though, it really isn't that hard ;)
-
Hi there, and thanks for the tutorial. I'm trying this for the first time (the ATmega is going to be used in a slim temp node), and I'm receiving this message you mentioned:
avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to overrideYou mention we should try the following:
Maybe your chip is configured to run on an external crystal clock. I tested with two values and it succeeded. I used 10Mhz and 20Mhz as I didn't have 16 Mhz. Connect the crystal to pin 9 and 10 Note: You won't need the crystal except for the first time as the new bootloader is configured to run on internal 1Mhz or 8Mhz.I don't quite follow what this means? Do I need a 10mhz, 16mhz or 20mhz crystal attached to the breadboard like you show in the video? If so, is that the only change I would need to make?
FYI I'm using an Arduino clone (Buono uno r3, set at 5V)
-
Hi there, and thanks for the tutorial. I'm trying this for the first time (the ATmega is going to be used in a slim temp node), and I'm receiving this message you mentioned:
avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to overrideYou mention we should try the following:
Maybe your chip is configured to run on an external crystal clock. I tested with two values and it succeeded. I used 10Mhz and 20Mhz as I didn't have 16 Mhz. Connect the crystal to pin 9 and 10 Note: You won't need the crystal except for the first time as the new bootloader is configured to run on internal 1Mhz or 8Mhz.I don't quite follow what this means? Do I need a 10mhz, 16mhz or 20mhz crystal attached to the breadboard like you show in the video? If so, is that the only change I would need to make?
FYI I'm using an Arduino clone (Buono uno r3, set at 5V)
@rsachoc Maybe I need to rephrase the sentence :)
I meant that any crystal value will work. I didn't have 16Mhz, but I had the values 10Mhz and 20 Mhz. So I tested with 10 Mhz and I bypassed the error and didn't come again. I wanted to know further whether the crystal value is important or not. So I got another chip with preloaded arduino bootloader, and tested with 20Mhz. Also I succeeded. Thus I assume that you can use any value for this step .I am also using Uno clone and this is the only thing I did regarding this issue. I didn't even add capacitors to the crystal. Just put any value and test.
-
@rsachoc Maybe I need to rephrase the sentence :)
I meant that any crystal value will work. I didn't have 16Mhz, but I had the values 10Mhz and 20 Mhz. So I tested with 10 Mhz and I bypassed the error and didn't come again. I wanted to know further whether the crystal value is important or not. So I got another chip with preloaded arduino bootloader, and tested with 20Mhz. Also I succeeded. Thus I assume that you can use any value for this step .I am also using Uno clone and this is the only thing I did regarding this issue. I didn't even add capacitors to the crystal. Just put any value and test.
@ahmedadelhosni thanks! I'm going to grab a 10mhz and 16mhz to test later this evening. Just to confirm from what you've said, I don't need the capacitors? I know in the youtube vid there were capacitors used?
-
@ahmedadelhosni thanks! I'm going to grab a 10mhz and 16mhz to test later this evening. Just to confirm from what you've said, I don't need the capacitors? I know in the youtube vid there were capacitors used?
@rsachoc yes. I didn't also have caps and it worked :)
-
@ahmedadelhosni thanks! I'm going to grab a 10mhz and 16mhz to test later this evening. Just to confirm from what you've said, I don't need the capacitors? I know in the youtube vid there were capacitors used?
@rsachoc ofcourse if you have 16Mhz and capacitors like the reference video, that would be great. but if you were in a hurry and lazy to buy some, so just do it like so.
Edit: 16* Mhz not 10 Mhz -
@rsachoc ofcourse if you have 16Mhz and capacitors like the reference video, that would be great. but if you were in a hurry and lazy to buy some, so just do it like so.
Edit: 16* Mhz not 10 Mhz@ahmedadelhosni I have some capacitors, but no crystals, so I'm picking a 10mhz and 16mhz up later today. I'll try with just the capacitors first and see how I go.
Thanks!
-
@ahmedadelhosni I have some capacitors, but no crystals, so I'm picking a 10mhz and 16mhz up later today. I'll try with just the capacitors first and see how I go.
Thanks!
@rsachoc edit: sorry I meant 16. Like the normal arduino board
-
C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/bin/avrdude -CC:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/etc/avrdude.conf" Using Port : COM5 Using Programmer : stk500v1 Overriding Baud Rate : 19200 AVR Part : ATmega328P Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : STK500 Description : Atmel STK500 Version 1.x firmware Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x1e950f avrdude: erasing chip avrdude: reading input file "0x3F" avrdude: writing lock (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of lock written avrdude: verifying lock memory against 0x3F: avrdude: load data lock data from input file 0x3F: avrdude: input file 0x3F contains 1 bytes avrdude: reading on-chip lock data: C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/bin/avrdude -CC:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM5 -b19200 -Uflash:w:C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex:i -Ulock:w:0x0F:m Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of lock verified avrdude: reading input file "0x05" avrdude: writing efuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of efuse written avrdude: verifying efuse memory against 0x05: avrdude: load data efuse data from input file 0x05: avrdude: input file 0x05 contains 1 bytes avrdude: reading on-chip efuse data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of efuse verified avrdude: reading input file "0xDE" avrdude: writing hfuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory against 0xDE: avrdude: load data hfuse data from input file 0xDE: avrdude: input file 0xDE contains 1 bytes avrdude: reading on-chip hfuse data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of hfuse verified avrdude: reading input file "0xFF" avrdude: writing lfuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0xFF: avrdude: load data lfuse data from input file 0xFF: avrdude: input file 0xFF contains 1 bytes avrdude: reading on-chip lfuse data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of lfuse verified avrdude done. Thank you. avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/etc/avrdude.conf" Using Port : COM5 Using Programmer : stk500v1 Overriding Baud Rate : 19200 AVR Part : ATmega328P Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : STK500 Description : Atmel STK500 Version 1.x firmware Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x1e950f avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex" avrdude: writing flash (32768 bytes): Writing | ################################################## | 100% 0.00s avrdude: 32768 bytes of flash written avrdude: verifying flash memory against C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex: avrdude: load data flash data from input file C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex: avrdude: input file C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex contains 32768 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% -0.00s avrdude: verifying ... avrdude: 32768 bytes of flash verified avrdude: reading input file "0x0F" avrdude: writing lock (1 bytes): Writing | ################################################## | 100% 0.02s avrdude: 1 bytes of lock written avrdude: verifying lock memory against 0x0F: avrdude: load data lock data from input file 0x0F: avrdude: input file 0x0F contains 1 bytes avrdude: reading on-chip lock data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of lock verified avrdude done. Thank you.Did I burn the bootloader successfully? The video indicates it should take longer, this literally took less than a second?
-
C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/bin/avrdude -CC:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/etc/avrdude.conf" Using Port : COM5 Using Programmer : stk500v1 Overriding Baud Rate : 19200 AVR Part : ATmega328P Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : STK500 Description : Atmel STK500 Version 1.x firmware Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x1e950f avrdude: erasing chip avrdude: reading input file "0x3F" avrdude: writing lock (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of lock written avrdude: verifying lock memory against 0x3F: avrdude: load data lock data from input file 0x3F: avrdude: input file 0x3F contains 1 bytes avrdude: reading on-chip lock data: C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/bin/avrdude -CC:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM5 -b19200 -Uflash:w:C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex:i -Ulock:w:0x0F:m Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of lock verified avrdude: reading input file "0x05" avrdude: writing efuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of efuse written avrdude: verifying efuse memory against 0x05: avrdude: load data efuse data from input file 0x05: avrdude: input file 0x05 contains 1 bytes avrdude: reading on-chip efuse data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of efuse verified avrdude: reading input file "0xDE" avrdude: writing hfuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory against 0xDE: avrdude: load data hfuse data from input file 0xDE: avrdude: input file 0xDE contains 1 bytes avrdude: reading on-chip hfuse data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of hfuse verified avrdude: reading input file "0xFF" avrdude: writing lfuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0xFF: avrdude: load data lfuse data from input file 0xFF: avrdude: input file 0xFF contains 1 bytes avrdude: reading on-chip lfuse data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of lfuse verified avrdude done. Thank you. avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\tools\avr/etc/avrdude.conf" Using Port : COM5 Using Programmer : stk500v1 Overriding Baud Rate : 19200 AVR Part : ATmega328P Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : STK500 Description : Atmel STK500 Version 1.x firmware Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x1e950f avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex" avrdude: writing flash (32768 bytes): Writing | ################################################## | 100% 0.00s avrdude: 32768 bytes of flash written avrdude: verifying flash memory against C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex: avrdude: load data flash data from input file C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex: avrdude: input file C:\Users\James\Desktop\RPi Openhab\arduino-1.6.7-windows\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex contains 32768 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% -0.00s avrdude: verifying ... avrdude: 32768 bytes of flash verified avrdude: reading input file "0x0F" avrdude: writing lock (1 bytes): Writing | ################################################## | 100% 0.02s avrdude: 1 bytes of lock written avrdude: verifying lock memory against 0x0F: avrdude: load data lock data from input file 0x0F: avrdude: input file 0x0F contains 1 bytes avrdude: reading on-chip lock data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of lock verified avrdude done. Thank you.Did I burn the bootloader successfully? The video indicates it should take longer, this literally took less than a second?
@rsachoc I haven't burned a bootloader since I have did this topic, but I do remember that it took like 2 seconds. It was really fast.
You can try flashing the code to verify that it works well.