-
Notifications
You must be signed in to change notification settings - Fork 18
bootloader
#How to flash the bootloader using the USBtinyISP programmer
(short version at the end of this page) ##1) Install Winavr http://www.ladyada.net/learn/avr/setup-win.html you should be able to run avrdude from the command line as explained in this tutorial
##2) Install USBTinyISP driver from here : http://www.adafruit.com/downloads/usbtiny_signed_8.zip
following these instructions :
https://learn.adafruit.com/usbtinyisp/drivers This will allow avrdude to communicate with the programmer
##3) Download the booloader from here
##4) Verify that Avrdude is installed :
Open the terminal in the directory where you downloaded the bootloader and type :
avrdude -c usbtiny -p m328p
It should respond :
##5) Verfify the USBtinyISP driver is installed
Connect the USBtiny programmer and type the same command avrdude -c usbtiny -p m328p
It should respond :
##6)Verify the board is working
Connect the programmer the board
Respect the orientation of the cable
The board has a small mark to identify pin1
and type the same command avrdude -c usbtiny -p m328p
It should respond :
##7) Program the fuses with this command
avrdude -c usbtiny -p m328p -qq -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m -U efuse:w:0x05:m
(no response here)
##8) Burn the bootloader with
avrdude -c usbtiny -p m328p -b 9600 -F -U optiboot_atmega328.hex
and it will respond
You can also flash the bootloader using the Arduino IDE
- Connect the programmer to usb
- launch Arduino software
- go to Tools/Boards and choose Arduino/Genuino Uno
- go to Tools/Pogrammer and choose USBasp or USBtinyISP (depending the programmer you have)
- Connect the programmer to the board (be careful with the polarity, see lon version)
- go to Tools/Burn Bootloader (bottom of the Tools menu)
You should now be able to upload code via the usb port using the Arduino IDE