Академический Документы
Профессиональный Документы
Культура Документы
cc/en/Guide/Core
let's make
Login|Sign Up
share what you make >
Featured:
Intel IoT
Arduino
Parties
With Instructables you can share what you make with the world, and tap into an ever-growing
community of creative experts.
In an instructable "Make an Attiny13 based IR proximity sensor for $2.42" by Dustin Andrews
refers to having to install the Attiny13 core files.
Unfortunately the core files that are linked to do not contain the boards.txt file that will let the
Attiny 13 show up as choice under 'Tools-boards' in the IDE. If you are a novice at installing
core files this may seem daunting, but since I just did it, I thought I'd just share that knowledge
with you.
Do the following:
-Download the Attiny cores from: http://sourceforge.net/projects/ard-core13/
-Go to your sketches folder
-most likely there is a folder called 'hardware' if not, create that.
-open the hardware folder
-create a folder called 'attiny13'
-open that folder
-create a folder called cores
-open that folder
-create a new folder called 'core13'
-so now you have the structure /hardware/attiny13/cores/core13
-open that deepest folder and unzip the attiny core files to that folder
-go back to your /hardware/attiny13 folder
-create a text file called 'boards.txt'
open that file.
paste the following text in that file:
###########################################################################
attiny13int.name=Attiny13 @ 128 KHz (internal watchdog oscillator)
attiny13int.upload.using=arduino:arduinoisp
attiny13int.upload.maximum_size=1024
attiny13int.upload.speed=250 # important for not losing connection to a slow processor
attiny13int.bootloader.low_fuses=0x7B
attiny13int.bootloader.high_fuses=0xFF
attiny13int.bootloader.unlock_bits=0x3F
attiny13int.bootloader.lock_bits=0x3F
attiny13int.build.mcu=attiny13
attiny13int.build.f_cpu=128000
attiny13int.build.core=core13
###############################################################
attiny13at4.name=ATtiny13 @ 4.8MHz (internal 4.8 MHz clock)
attiny13at4.upload.using=arduino:arduinoisp
attiny13at4.bootloader.low_fuses=0x69
attiny13at4.bootloader.high_fuses=0xff
attiny13at4.upload.maximum_size=1024
attiny13at4.build.mcu=attiny13
attiny13at4.build.f_cpu=600000
attiny13at4.build.core=core13
###############################################################
attiny13.name=ATtiny13 @ 9.6MHz (interne 9.6 MHz clock)
attiny13.upload.using=arduino:arduinoisp
attiny13.bootloader.low_fuses=0x7a
attiny13.bootloader.high_fuses=0xff
attiny13.upload.maximum_size=1024
attiny13.build.mcu=attiny13
attiny13.build.f_cpu=1200000
attiny13.build.core=core13
###############################################################
I got this 'boards.txt' file from here, but had to adapt it a little as that file 'sneekishly' suddenly
changes the programmer in its last definition and also I had big trouble getting more than 2
boards to show up, until I realised that 2 of the board definitions carried the same name, so I had
to change that as well. Also, the names of the boards are not entirely correct. The fuses on the 4.8
MHz board are 0x69 and 0xFF. That indicates that the prescaler is already set to division by
eight, which corresponds with the f_cpu of 600.000.
For the 9.6MHz internal clock board, we see that the fuses 0x7a and 0xFF are in fact correct for
9.6MHz without prescaler, but then the f_cpu of 1200.000 is not correct, that points to a division
by 8 for which the fuses should be 0x6A and 0xFF. However, i didnt mess with that and
everything worked fine, but the timings might be off.
You may want to adapt your boards.txt file once you have it all installed to reflect the true
settings. Also, you will not find the 128kHz setting very useful and the danger is that you may
not be able to communicate
with your chip anymore because it becomes too slow
So, just as a final check that you have done everything right:
Go to your hardware folderYou should see a folder there called attiny13
Open that folder
It should have 2 entries: a folder called 'cores' and a text file called 'boards.txt'
open the folder 'cores'
That should have one entry: a folder called 'core13'
open 'core13'. There you should find 13 files with 'h', 'c' and 'cpp' extensions.
To make it easy I made a zip file that should unpack with the right directory structure. Unzip it in
the 'hardware' folder.
As an added note: in 2015 when i wanted to program some Attiny13's, seemingly i had screwed
up my installation and I couldnt program the chips anymore. Apparently I had forgotten I wrote
this ibble. A search found my own ibble and when i installed the zip file... everything went like
clockwork again.
I see and I think I know where the problem is. What bootloader did you upload to the Attiny13?
As far as I know there is no bootloader for the Attiny13. If you just clicked the option "ToolsBurn Bootloader", The only thing that happens is that it sets some fuses that define some
characteristics of the Attiny, like what the oscillator speed is.
It is not that it suddenly has a bootloader that will upload programs. For that you just have to use
"File-Upload Using Programmer"
So, again.. what you do is to laod the ISP in your UNO, connect the progarmming circuit (did
you include the resistor in your circuit to prevent resetting?)
Then you choose "Tools-board-Attiny13-9.6MHz" (or 4.8 or whatever) and you then choose
'Burn bootloader"
As I explained, that doesnt burn a bootloader, it just sets fuses to tell the attiny it is 9.6 MHz (in
this case).
Then you load the program you want into yr attiny13 in the IDE and you go to Files-Upload
using programmer"
Done
attiny13at4np.build.core=core13
###############################################################
attiny13.name=ATtiny13 @ 9.6MHz (internal 9.6 MHz clock/no prescaler)
attiny13.upload.using=arduino:arduinoisp
attiny13.bootloader.low_fuses=0x7a
attiny13.bootloader.high_fuses=0xff
attiny13.upload.maximum_size=1024
attiny13.build.mcu=attiny13
attiny13.build.f_cpu=9600000
#attiny13.build.f_cpu=1200000
attiny13.build.core=core13
###############################################################
attiny13ps.name=ATtiny13 @ 9.6MHz (internal 9.6 MHz clock/w 8 prescaler)
attiny13ps.upload.using=arduino:arduinoisp
attiny13ps.bootloader.low_fuses=0x6a
attiny13ps.bootloader.high_fuses=0xff
attiny13ps.upload.maximum_size=1024
attiny13ps.build.mcu=attiny13
attiny13ps.build.f_cpu=1200000
attiny13ps.build.core=core13
###############################################################
attiny13ex.name=ATtiny13 @ 16MHz (External Crystal)
attiny13ex.upload.using=arduino:arduinoisp
attiny13ex.bootloader.low_fuses=0x78
attiny13ex.bootloader.high_fuses=0xff
attiny13ex.upload.maximum_size=1024
attiny13ex.build.mcu=attiny13
attiny13ex.build.f_cpu=16000000
attiny13ex.build.core=core13
###############################################################
at processing.app.debug.Compiler.getCommandCompilerCPP(Compiler.java:554)
at processing.app.debug.Compiler.compileFiles(Compiler.java:246)
at processing.app.debug.Compiler.compileSketch(Compiler.java:592)
at processing.app.debug.Compiler.compile(Compiler.java:96)
at processing.app.Sketch.build(Sketch.java:1569)
at processing.app.Sketch.build(Sketch.java:1548)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1915)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at processing.app.helpers.StringReplacer.replaceFromMapping(StringReplacer.java:99)
at processing.app.helpers.StringReplacer.replaceFromMapping(StringReplacer.java:91)
at processing.app.helpers.StringReplacer.formatAndSplit(StringReplacer.java:39)
at processing.app.debug.Compiler.getCommandCompilerCPP(Compiler.java:552)
... 7 more
Note: If I compile my sample sketch for an UNO, it looks good.
Any ideas?
Great! :-)
diy_bloke 218
Bio: I am a physician by trade
Related
Intel IoT
Life Hacks
Beauty
Woodworking
Minecraft
Breakfast
Laser Cut
Organizing
Arduino
Newsletter
Join 2 million + to receive instant inspiration in your inbox.
Mobile
Download our apps!
Android
iOS
Windows
About Us
Who We Are
Advertise
Contact
Jobs
Help
Resources
For Teachers
Artists in Residence
Forums
Answers
Sitemap
Terms of Service|
Privacy Statement|
Mobile Site