Yay! Bare Attiny85, no USB, no bootloader: Success! So the short version of my success goes something like this. I choose to use Adafruit’s Trinket core since we know FastLED works with it. I also have an Atmel mkII programmer ($37.50 both at Mouser or Digi-Key) and Atmel Studio 6.1 (free download.) I discovered that my Olimex AVRISP does not support tinys so it’s been relegated to a drawer.
The (somewhat) short form steps are:
Open Arduino IDE
Select Trinket 16MHz board
Open FastLED’s Blink sketch
Make changes for attached strip (in my case an LPD8806)
Compile the sketch (note, COMPILE, not Upload)
Switch to AS6.1 and open Device Programming window
Select Attiny85 from dropdown and programmer
Read device to make sure it reads properly
Set fuses according to Trinket’s boards.txt file
Select the Blink.hex file that got compiled above and hit Program
Voila, blinking red light!
Ok, so that’s a little more than a ‘short’ set of steps, but it works and can certainly be used to program bare ICs that can then be plugged into final design devices. It also means one does not need to have it configured with a USB connector to make it work. I can use the design I posted a few days ago and use the ICSP connector to program these things.
Also, keep in mind that there is no bootloader on the chip! All it has on it is the final sketch that’s running. When I hit reset, there is no ten seconds waiting period for the bootloader to time out, it instantly starts the sketch. That’s one of the advantages of running AVRs without a bootloader (although the newer bootloader will also instantly start the sketch if they don’t detect a serial signal, it’s only the older ones that would wait a few seconds.)
I’m going to write out this whole process, with screen grabs and pictures and put it on my web site and link it back here when done. Maybe someone will find it of some use to them.
Absolutely! If you have one of those, go for it. However, using an AVRISP with AS isn’t limited to just the tinys. The same process can be used to program the entire line of AVRs, whereas with the USBtinyisp, you’re stuck with only programming a very small subset of the AVR family. If you never plan on using anything else, then you certainly don’t need to change your process, it works. I on the other hand work with several other members of both the mega and tiny families, so having a way outside of the IDE to program them is the best solution for me as the IDE doesn’t have support for everything, whereas AS does.
Eventually I’m going to move entirely too AS and not use the Arduino IDE anymore, but that requires porting a lot of stuff and rewriting things and my wine collection just isn’t enough to get me through that right now.
I got a USBasp from ebay for about $2 for programming my attiny85s. It actually seems to be faster and more reliable than either Arduino ISP or programming a regular arduino!
That’s because ArduinoISP is software based, whereas the USBasp or the mkII are both hardware based. Where an ArduinoISP setup takes upwards of 10-20 seconds to burn a new bootloader, uploading it via AS with the mkII takes all of 2-3 seconds.
But as I pointed out on my other post, the use of AS with an mkII isn’t just for the ATtiny85. With the same setup, you can program the full range of AVRs from Atmel. I write code for several different ATtinys for which I only have core files, no bootloaders. With just the core files, you can write code in the Arduino IDE, taking advantage of the various libraries available, compile, and upload using AS with an mkII. The ATtiny85’s bootloader from Adafruit takes up almost 3K out of the limited 8K that it has. With AS and the mkII, I don’t need the bootloader.
I find the Arduino IDE quite annoying to use (I use IntelliJ IDEA for work), where the integration with devices and libraries is really the only thing keeping me using it. Do you know if there’s anything else that approaches that usability with a better coding interface?
I wish. Ultimately I plan on moving to AS entirely. There are ways to set it up so you can code for the various Arduino boards and using the Arduino specific libraries but it’s just a pain in the rear to do. Some folks like using Eclipse … I’ve never tried.
I’ve tried eclipse, Xcode and a sublime extension. In the end I’ve always ran into problems in the heat of a project that end up driving me back to the arduino IDE (for uploading). None of the other methods work as consistently.
Since there’s no debugging rock stable programming is a must for me.
For strictly uploading, I’ve never had issues with doing it through AS if I had to. As long as it compiled without errors, AS will upload. Whether it’s a HEX or ELF file.
In the past I developed a library in C++ Xcode, included in an Arduino program, and just alt-tab to Arduino IDE to compile and upload it. That seemed to work ok. I suppose you could also have a setup and loop in a library too, then just a basic arduino program to bootstrap it.