0
\$\begingroup\$

I've taken a liking to building circuits around the ATTiny. Typically I add 6 headers and use an AVR programmer or an Arduino to program the ATTiny in circuit.

I'm trying to figure out how move that AVR programmer into the circuit such that my device is programmable via the Arduino IDE or avrdude.

It seems like I could use V-USB and USBtinyISP, but the commercial license for the former might be cost prohibitive.

Are there any common circuits people add to AVR projects that make them programmable via USB?

\$\endgroup\$
  • \$\begingroup\$ IIRC you will need to use a high voltage programmer \$\endgroup\$ – esoterik Jan 29 at 23:23
1
\$\begingroup\$

If you want a part that's programmable over USB, use a microcontroller with a USB bootloader, like the ATmega16u4/32u4.

Libraries like V-USB are intended for designs which are primarily a USB device. They have nontrivial resource and hardware requirements (especially relative to the ATtiny85), making them a poor fit for a design where USB is an infrequently used secondary feature.

\$\endgroup\$
  • 1
    \$\begingroup\$ You have it backwards - roundabout USB implementations make more sense as a cost saving for situations where it will be rarely used and the chip need do little else while faking USB, while true hardware USB implementation gives versatility for routine use. Note there are software USB bootloaders for the ATtiny85 and products dependent on that being pushed. \$\endgroup\$ – Chris Stratton Jan 30 at 2:00
  • \$\begingroup\$ It's debatable, I guess. :) Anyways, my biggest concern on a tiny85 would be pin count -- with only five GPIOs (or six if you disable reset), allocating two pins just for USB is kind of a big ask. \$\endgroup\$ – duskwuff Jan 30 at 7:58
  • \$\begingroup\$ @duskwuff, That's interesting. You're saying that by the time I put the ATTiny on there and whatever else I need for the ICSP (with or without licenses), I may as well have just used the ATmega and just leave the original DFU bootloader in place? Also, FWIW, I think that Micronucleus is pretty small, but I haven't used it. \$\endgroup\$ – D. Patrick Jan 30 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.