I purchased an Adafruit Trinket which is an Arduino (somewhat) compatible ATtiny85 board with a USB bootloader priced at $7.95 U.S. I received it Monday and had a great play with it Tuesday before I decided that I needed to breadboard a DIP clone.

Added: PLEASE support Adafruit Industries and purchase at least ONE (1) Trinket if you plan on doing breadboarding. The $8 will simply be good business, support Adafruit, and provide YOU with a firm foundation to work through issues you may have; that is, you will be able to use the Adafruit support forum and feel good about yourself.

Thanks to some very good documentation and the availability of the source files (Thank you Ladyada), the process was not overly painful. I thought I would summarize the steps for those wanting to do the same. For the record, the firmware to be compiled can run at both 8MHz and 16MHz and at 3.3V or 5V simply based on your needs. I'm going to build the 5V version since it includes the two 3.6V zener diodes which provide for signal level conversion for the D+ and D- USB signals.

Create a 'batch' file for Windows which adds the necessary utilities to the path environment. Create this file in the the same folder as the expanded files from the Github download (folder with boot.c, jump.asm, etc.)

Note: You MUST provide your installation path correctly. The "path=" command will temporary configure the Windows command environment to include the AVR utilities, in this case, the Make utility.

In the command window, type MAKE to run the downloaded makefile. You will get six (6) HEX files: LV indicate 3.3V and HV indicates 5.0V. BUT Adafruit ships the same HEX file on both their 3V and 5V configurations! You will only need the file titled flash_me_lv.hex

Using your AVR ISP programmer (UNO, etc. running ArduinoISP) use the above HEX file and burn your ATtiny85P-PU DIP. If you are using an Arduino as ISP, the command line appears as:(Remember, your COM port will likely be different!)

Please note: you cannot use the Adafruit USB VID/PID for your own non-Trinket/Gemma products or projects. Purchase a USB VID for yourself at http://www.usb.org/developers/vendor/

Added: The above quote is from Adafruit, however, this alternative may be viable: http://www.obdev.at/products/vusb/license.html. I personally have V-USB licenses for HID projects but I have NOT tried to modify the Adafruit .H file to determine if my codes will function in the boot loader. Just FYI.

Ray, Great write-up! Like you I found the new little trinket to be quite useful. I, too, need to program a DIP version of the ATTiny85 with the bootloader. I followed your instructions and simply can't get the bootloader to compile. I've tried on a Win XP & Win 7(32 bit) machine with no success.

After looking at your detailed logs, I saw what the problem was and now can compile the bootloader myself. The issue was the path. Your original batch file recommendation had the hardware\tools\avr\utils\bin listed. However, in your provided logs, the hardware\tools\avr\bin was also included. For some reason, the latter was not present in my normal path (I did install my arduino from the Zip file rather than the MSI file, not sure if that had anything to do with it). Once both paths were included, things worked like a charm.

The Trinket is cute, but a wee delicate for the kind of development abuse I throw at projects. Therefore, I keep a storage box with "real" UNO, Mega2560, Trinket, Leonardo, etc.) but I generally develop and debug on a solderless protoboard. That way, my scope, DSG, and lab power supply are all easily connected. The value of the "real thing' is appreciated when a brick-wall appears and I need to quickly know if I have a hardware issue or a software issue! Dropping the code into an actual device is a quick decision-maker.

You will find a few Trinket-specific code samples I wrote for the Adafruit Forum here (very basic stuff for that audience):

great thread ray, but i also had problems building. what should take 5 minutes ended up 3 hours of tail chasing.

p.s. why providers dont tack on some hex is a mystery. only adds a tiny fraction to the zip file size so thats not an issue. imo it is a great help and generally courteous to give noobs (and occasionally self proclaimed experts like me) a helping hand. 5 seconds of your time can save what i estimate to be hundreds of man hours overall.

p.s. why providers dont tack on some hex is a mystery. only adds a tiny fraction to the zip file size so thats not an issue

My guess is that the product was released too soon, there are three hardware products that depend on the firmware and the core file is known to have a bug in PWM. So, updates will need to be made ASAP.

In the case of Digispark, they did bind the HEX into their ZIP archive.

With a few weeks under my belt playing around with my Chachka, the 5V Attiny85 V-USB clone of the Adafruit Trinket (uses the Trinket bootloader which is "known" to AVRDUDE and therefore can upload from the Arduino GUI) I have found the device to be exceptionally useful for small projects and the V-USB enabled bootloader makes loadings small sketches of approximately 5.5K easy. However, Adafruit released the Trinket without a lots of library support; but have added a few Trinket-centric libraries: refer to their support forum,http://forums.adafruit.com/viewforum.php?f=52

But the topic of this post is that the Digispark tiny85 libraries generally work simply by #include and without issue. This gives the Trinket, and use Chachka clone a wider range of proven libraries. In particular, the HID keyboard which works wonderfully.

As the t84/t85 have the same SRAM and FLASH, the bootloader should not require a significant amount of modification, if any. The core files should handle it (hoepfully.) Please report back if you try it.

I am trying to compile the trinket source for an Attiny84 as it uses V-USB if I used tiny core bootloaders I would need a serial chip for use with the Arduino IDE.

I already have an Attiny84 V-USB project on a custom PCB (below)

I just thought it would be nice to have the option of an Arduino bootloader on it.

The first PCB for the project was actually for an Attiny85 but without a crystal OFC, but enumeration becomes unstable especially between different computers.

With a Attiny2313 or a 84 with a crystal it works on every pc I throw it at whether its USB1,2 or 3 port. I think Adafruit suggest not using USB3 Ports at all with the trinket and I can see why, but unfortunately on allot of modern laptops and later chip sets USB3 is the only option, so it is sometimes pot luck whether it with work or not .

I also noted on some hardware the attiny85 would not even survive a reboot without re-inserting the device.

I use xtal16MHz with all of my V-USB on mega328P projects and Optiboot bootloader- never had an issue from XP to Win8.1 BUT none of my many notebooks are USB3 equipped so I am unsure if an issue would exist, but I am hopeful that there would be none.

The Trinket gave (me) lots of sync errors. Adafruit is insistent to use the existing VID/PID AVRtinyISP definition used with AVRDUDE. Digispark, took a totally different route with a custom boot loader exec. and this seems stable in my limited testing. None of my t85 projects have used bootloaders, just ISP. I have built 3 prototype Trinkets (now Digispark) for bench playing. I am unsure if I would be willing to sacrifice 2K in a real project!

For Trinket & Diguspark, I have not attempted to modify the bootloaders, rather just using the provided make to build the source.I DID note while reading through the Digispark Forum that there is a send-only driver InSide the Digispark core.http://digistump.com/board/index.php/topic,927.0.htmlInteresting - I have not profiled this against Gammon's send only software serial, but it may be lighter weight.

The small form-factor in a commercial product that is V-USB is the point. V-USB, for novices, can be tricky because of the component values. Also, Adafruit is producing it in 3.3V and 5.0V versions. These tiny, high quality boards, are ideal for a singularity of use. Once could easily spend more than $8 in securing quantity-one parts.

"their core doesn't seem to be as good"Yep, agreed. But then there is the Digispark core and their libraries.

@koogar:

Quote

Have you had a play with the Adafruit IRKey source yet Ray ?

Not yet. Last weekend was the Stone Mountain Hamfest in Lawrenceville and I had been busy putting together Magic Morse units for sale. The weather was beautiful, the crowd a bit light, and folks were tight with their dollars, however I did manage to make the trip worth my while... well, I only live 2 miles away XD

Update 2:@Koogar:Ok, I looked at the Adafruit IR thingy... Here is the only significant "value" that I found:

Quote

We bundle this with our remote with 21 buttons so it controls nearly anything you want.

Essentially, it is a turnkey little unit. However, I think the price is way too expensive by at least 2X... the little IR hand transmitters are available inexpensively from Hong Kong... I have 10 of them in the lab right now, but I still like the idea of using a "Sony" Universal remote because you are not painted into a corner should you step on your IR remote and crush the beast like a bug. http://www.ebay.com/itm/HX1838-Infrared-Remote-Control-Module-Code-Infrared-Remote-Control-Code-Infrared-/400529215865So, about $5 unit 1 including shipping. I bought 10x because the shipping is free then and I had a few folks interested in a couple each... they have yet to follow through on pickup, however!