after making a usbtiny isp programmer and using it for 6 months, i was looking at making another one for carrying around. i like the simplicy of the usbtiny isp design but would like to make it even smaller and take less parts. one thing in the original design that i want to change is to eliminate the use of clock crystal. one solution i found is that v-usb drivers supports the 16.5Mhz internal oscillator on attiny25/45/85 devices. so i start out this project to have usbtiny isp employs v-usb for usb communication. the immediate benefits is that it saves space and have less component counts (no more crystals).
usbtiny
description from http://www.xs4all.nl/~dicks/avr/usbtiny/
USBtiny is a software implementation of the USB low-speed protocol for the Atmel ATtiny microcontrollers. Of course, it will also work on the ATmega series. The software is written for an AVR clocked at 12 MHz. At this frequency, each bit on the USB bus takes 8 clock cycles, and with a lot of trickery, it is possible to decode and encode the USB waveforms by software. The USB driver needs approximately 1250 to 1350 bytes of flash space (excluding the optional identification strings), depending on the configuration and compiler version, and 46 bytes RAM (excluding stack space). The C interface consists of 3 to 5 functions, depending on the configuration.
vusb
description from http://www.obdev.at/products/vusb/
V-USB is a software-only implementation of a low-speed USB device for Atmel's AVR microcontrollers, making it possible to build USB hardware with almost any AVR microcontroller, not requiring any additional chip.
video on construction and usage
Remove these ads by
Signing UpStep 1: Features and parts
* programming logic from usbtiny isp, mature avr-dude support
* small foot-print
* minimal components
* powers target device
note that the io lines to the target mcus are not protected. you can add 1k-2k resistors to SCK and MOSI and protect against possible wrong connections
references
based on the works found at
v-usb from framework http://www.obdev.at/vusb/
usbtiny isp http://www.xs4all.nl/~dicks/avr/usbtiny/
parts list
* attiny45/85 (85 is more easier to come by)
* 3.6v zener diodes (1n747,BZX79,..avoid 1W types)
* 68ohm resistor x 2
* 1.5K resistor
* mini breadboard 170 tiepoints
* usb cable (dollar shop usb printer cable is fine)
* 1k/2k resistors for io lines protection (optional)
tools required
* a working avr programmer (yes, it's a catch22, we need one to make one)
* working avr programming environment







































Visit Our Store »
Go Pro Today »




Also, what benefit does the "optional 0.1uf capacitor" bring, and where does it fit in the circuit diagram? I'm feeling really fuzzy today and I'm having trouble working backwards from the photo of the breadboard.
the 0.1uF capacitor is just a bypass cap to stablise power supply (like any other projects). if u have one, put it it.
there are many successful builds of this project. google vusbtiny and u can find other's experience / modification to make it work.
As for the I/O line resistors, I got that but I'm not sure where they're supposed to go in the circuit diagram. (That's also my second question about the bypass cap since, lately, I've been jet-lagged and my free time coincides with the time I'm too dozy to make sense of how the breadboard photo maps to the circuit diagram.)
Note that in this last case I had to wire pin4 of J2 to the Atmega328's SCK (that is pin 19), not to the SCL (that was pin 28).
And I was on Windows7 64bit, if anyone cares.
Every thing worked perfectly on the first try - so big congratulations for presenting such a useful project and making things so simple and the instructions so precise!
Thanks!!!
Can the 68Ohm resistors be replaced with any other values (47Ohm, 100Ohm...) and the 150K one be replaced by another value say 1K or 2.2K ?
Would avoid burning fossil-fuel to get only those 2 from the store. Rest, I have pretty-much everything.
Also for your USB printer cable hack, can you explain the header connections ? You only seem to have Vcc and D+ connected to the header, and GND, D- isn't clear from the pic, if they are on their own headers or just plain terminated (left floating).
. the 68ohms are current limited (to protect the pins), so u should make them as close to 68 as u can. 47ohm definitely works. sometimes even better than 68ohms if u have a long usb cable.
. the 1.5k is a pullup, so anything between 1k to 5k is fine.
. follow the schematic / diagram, there are only 6/7 parts in this, the schematic also make notes of the 4pin header position. if u are talking about the usb cable itself, they can be different colored wires inside, u sould use a multi-meter to sort out which is which. i.e. measure between the contacts on one end against the 4 exposed wires against a usb pin-out diagram.
good luck on your build.
Here's one such thread: http://forums.obdev.at/search.php?fid[]=8&sid=ffe64be8b944f53757abea58c378899a
"Please note that D+ must also be connected to interrupt pin INT0!"
Can you tell me what you have done to avoid that?
Thanks for sharing!
the default D+ pin is INT0, but it can be changed, for attiny45/85 layout, i used portb.3, we can re-define USB_INTR_VECTOR to be the "pin change" interrupt. and any one of the 6 io pin level change will trigger the interrupt, which includes portb.3.
note that if u are also using some other higher priority interrupts this may fail.
inside usbconfig.h, toward the end of the file, u can see the various options.
#define USB_INTR_VECTOR SIG_PIN_CHANGE
//#define USB_INTR_VECTOR INT0_vect
//#define USB_INTR_VECTOR PCINT9_vect
so i can order this part ATtiny85V-10SU or this ATTINY85-20SH :) ?
use the 20mhz version (attiny85-20??), we need to use a internal oscillator clocked at 16.5Mhz to avoid external crystals.
for more technical details if u need, go to the vusb site for explanations.
good luck w/ your project.
I made mine to a piece of stripboard, and used an Arduino to program the chip.
I'll link my materials here, so people can see how it would fit to a stripboard.
The board could be made smaller if I used more wires instead of jumpers, but It's small enough for me like this :)
I don't take any responsibility for wrong schematics though, these are made from memory and might not be correct:
http://koti.mbnet.fi/johnedwa/misc/vUSBtiny_stripboard_v1.PNG
http://koti.mbnet.fi/johnedwa/misc/vUSBtiny_stripboard_v1_schematics.PNG
Or am i wrong?
2.If so what modifications do i need to make?
if u have an atmega, u should build the usbasp, it is also very simple to build.
just finished the fuse resetter instructable, enjoy.
if u make a pcb version and have (/will have) a project page i would like to link to that. sounds like u will shrink it even smaller w/ soic device.
1. Can I use an ATtiny25-20PU??
2. Can I use this programmer with the Arduino IDE as an ArduinoISP or USBtiny??
thanks for answering,
emihackr97.
P.D: If u make a kit, i can help u distribute them.
1. not enough flash space after i adopt to vusb firmware, missing about 2k, i tried to squeeze but failed.
2. yes, it's used like a usbtiny.
i don't mind if u make a kit but u really should ask usbtiny and vusb authors. i just combine the two and did not put much into this.
I would like to make it but don't have a programmer (well sounds obvious, no? :-) ). I have empty chips here, can anybody program it for me via mail exchange?
I'm in France...
If you mean you used GPL libraries in your code, and are only distributing source that you wrote (ie. it's not a derivative of GPL software), you can license your code any way you want - or even copyright it. Using standard libraries and gcc doesn't mean you have to GPL your code. Just making sure that's clear. :)
I love your structable. I'm totally going to make one of these with my ATtiny85 I have on my desk. I wonder if I can make it even smaller using my SOIC t85s..... Cheers!