Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Burning bootloader [DISCLAIMER: If fuse is already burned, ATtiny can be programmed only with 12V programmer]
- 1. Awesome video tutorial: https://www.youtube.com/watch?v=FI3s4d2I1eQ
- 2. Go to: https://github.com/micronucleus/micronucleus to grab your self bootloader [we will move it to newfolder]
- 3. My own 100% working bootloader: https://uloz.to/!tksqJt9EcIo3/t85-100-working-hex [we will move it to new folder]
- 4. Use arduino UNO (others can be used to) as arduino ISP programmer.
- a. Load ArduinoISP program on arduino
- b. Upload program to arduino [in this case UNO]
- 5. Connect ATtiny85 with arduino
- Arduino +5V -> ATtiny VCC
- Arduino GND -> ATtiny GND
- Arduino Pin 10 -> ATtiny P5 [reset pin, If you already burned fuse, you have to use 12V programmer]
- Arduino Pin 11 -> Attiny P0
- Arduino Pin 12 -> ATtiny P1
- Arduino Pin 13 -> ATtiny P2
- 6. Tools -> Board -> ATtiny25/45/85 [depends on your ATtiny board]
- 7. Tools -> Processor -> Attiny85
- 8. Tools -> Clock -> Internal 16MHz
- 7. Tools -> Programmer -> Arduino as ISP
- 8. Open -> Basics -> Blink
- 9. Change every "LED_BUILTIN" to "1" [ATtiny board does not have built in led. Instead it is using pin1 for blink]
- 10. Click "Upload"
- 12. If your ATtiny85 starts to blink, you are good to go [if not, there is a mistake somewhere]
- 13. Find your Arduino folder [folder where Arduino IDE is installed]
- 14. My case: O:\Program Files (x86)\Arduino [in reality my case is: O:\Windows\Plocha\Arduino\arduino\hardware\tools\avr/bin/avrdude -CO:\Windows\Plocha\Arduino\arduino\hardware\tools\avr/etc/avrdude.conf -v -pattiny85 -cstk500v1 -PCOM7 -b19200 -Uflash:w:O:\Windows\Plocha\Arduino/t85_100%_working.hex:i -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m]
- 15. Copy "Arduino" folder to your desktop [becuase we dont want any spaces in address]
- 16. Find in "Arduino" file called "averdude.exe" and copy its path -> C:\Desktop\Arduino\hardware\tools\avr\bin\averdude.exe [you might have different address]
- 17. Open CMD and type path to averdude: [change \avr\bin\averdude.exe to \avr/bin/averdude]
- C:\Desktop\Arduino\hardware\tools\avr/bin/averdude
- 18. Dont hit entre and continue typing: " " "-C""C:\Desktop\Arduino\hardware\tools\avr/etc/averdude.conf"
- C:\Desktop\Arduino\hardware\tools\avr/bin/averdude -CC:\Desktop\Arduino\hardware\tools\avr/bin/averdude.conf
- 19. Dont hit enter.We still need to add some other commands:" -v -pattiny85 -cstk500v1 -PCOM7 -b19200 -Uflash:w:C:\Desktop\Arduino/t85_100%_working.hex:i -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m"
- C:\Desktop\Arduino\hardware\tools\avr/bin/averdude -CC:\Desktop\Arduino\hardware\tools\avr/bin/averdude.conf -v -pattiny85 -cstk500v1 -PCOM7 -b19200 -Uflash:w:C:\Desktop\Arduino/t85_100%_working.hex:i -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m
- a. Change PCOM to port which arduino UNO is connected to
- b. Move your downloaded bootloader to "Arduino" folder
- c. Rename "t85_100%_working.hex" to name of your downloaded bootloader
- 20. Hit enter
- 21. If everything goes well, you should see this in CMD:
- avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
- Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
- Copyright (c) 2007-2014 Joerg Wunsch
- System wide configuration file is "O:\Windows\Plocha\Arduino\arduino\hardware\tools\avr/etc/avrdude.conf"
- Using Port : COM7
- Using Programmer : stk500v1
- Overriding Baud Rate : 19200
- AVR Part : ATtiny85
- Chip Erase delay : 400000 us
- PAGEL : P00
- BS2 : P00
- RESET disposition : possible i/o
- 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 12 4 0 no 512 4 0 4000 4500 0xff 0xff
- flash 65 6 32 0 yes 8192 64 128 30000 30000 0xff 0xff
- signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
- lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
- lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
- hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
- efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
- calibration 0 0 0 0 no 1 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 = 0x1e930b (probably t85)
- avrdude: safemode: hfuse reads as DD
- avrdude: safemode: efuse reads as FE
- 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 "O:\Windows\Plocha\Arduino/t85_100%_working.hex"
- avrdude: writing flash (8124 bytes):
- Writing | ################################################## | 100% 0.02s
- avrdude: 8124 bytes of flash written
- avrdude: verifying flash memory against O:\Windows\Plocha\Arduino/t85_100%_working.hex:
- avrdude: load data flash data from input file O:\Windows\Plocha\Arduino/t85_100%_working.hex:
- avrdude: input file O:\Windows\Plocha\Arduino/t85_100%_working.hex contains 8124 bytes
- avrdude: reading on-chip flash data:
- Reading | ################################################## | 100% 0.02s
- : verifying ...
- : 8124 bytes of flash verified
- : reading input file "0xe1"
- avrdude: writing lfuse (1 bytes):
- | ################################################## | 100% 0.01s
- avrdude: 1 bytes of lfuse written
- avrdude: verifying lfuse memory against 0xe1:
- avrdude: load data lfuse data from input file 0xe1:
- avrdude: input file 0xe1 contains 1 bytes
- avrdude: reading on-chip lfuse data:
- Reading | ################################################## | 100% 0.01s
- avrdude: verifying ...
- avrdude: 1 bytes of lfuse verified
- avrdude: reading input file "0xdd"
- avrdude: writing hfuse (1 bytes):
- Writing | ################################################## | 100% 0.01s
- avrdude: 1 bytes of hfuse written
- avrdude: verifying hfuse memory against 0xdd:
- avrdude: load data hfuse data from input file 0xdd:
- avrdude: input file 0xdd 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 "0xfe"
- avrdude: writing efuse (1 bytes):
- Writing | ################################################## | 100% 0.01s
- avrdude: 1 bytes of efuse written
- avrdude: verifying efuse memory against 0xfe:
- avrdude: load data efuse data from input file 0xfe:
- avrdude: input file 0xfe contains 1 bytes
- avrdude: reading on-chip efuse data:
- Reading | ################################################## | 100% 0.01s
- avrdude: verifying ...
- avrdude: 1 bytes of efuse verified
- avrdude: safemode: hfuse reads as DD
- avrdude: safemode: efuse reads as FE
- avrdude: safemode: Fuses OK (E:FE, H:DD, L:E1)
- avrdude done. Thank you.
- 22. You have successfully burned bootloader on your ATtiny85
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement