Go Down

Topic: <SOLVED> Has anyone built an USBtinyISP based on ATtiny45/85 ? (Read 1 time) previous topic - next topic

somedude

I built one and... surprise surprise... the USB part doesn't work.

Should anyone want to share their success, I would very much appreciate to know what firmware they used.

To build the hardware I used these sites: 1, 2 and 3, which are consistent as far as the hardware.

They also provided the hex files, two of them the same, which I tried.
The problem appears to be with USB - neither Linux nor W64 detected the device.
Windoze popped up the driver not installed and then disconnected the device, Linux did not enumerate it and it didn't show up in lsusb.

The fuses were set to 0xE1 0x5D, for PLL clock and disable reset.
I was able to recover the AVR with HVP and it's now back to default fuses.

If anyone was successful in building one, I would be very interested on the firmware used.

Thank you very much

swe-dude

I built one of these a year ago or so, if i remember right i used the firmware from here and its still working perfect.

http://littlewire.cc/index.html



Best of luck!

somedude

AWESOME!!!!

Thank you very much, I really appreciate this link.

somedude

swe-dude


I am having the same issues as with the other guy's firmware, plus some more, created by the 64 bitness of my machine...

The USB device does not put out any ID, so windoze disconnects it as invalid. That has to come from the firmware, so I'm not sure what to do.
Trying to use the bootloader and the software they provide was worse, as I think the software expects a working USBtinyISP as the programmer, so I am in a chicken and egg situation.

So I tried uploading the littlewire firmware with avrdude, then set the fuses and this is what didn't work in windoze.

Do you recall having used an USBtinyISP to program this? Was it Windows, maybe 32 bit, that you used to successfully install this?
Sorry for all the questions, but I am almost ready to call it quits.

Thanks again.

swe-dude

I think i used win7 64 back then, if i remember right i installed the micronucleus boothloader first then i used the Single click installer, hmm you might be able to create a littlewire uploader entry in board.txt too i think, atleast in arduino 1.0.x

hmm im courious so i think i will try it.

swe-dude


Just tried making a arduino boards.txt file for uploading littlewire and its working at least for me...

Try this just add the folder to your hardware folder, i used this with arduino (1.0.6 its easier to add extra boards there....)

This will load the littlewire hex file to a attiny 85, the reset will not work as i/o with these fuse settings but the programmer should be able to be recognized as a Usbtiny.

if its recognized i think you can change the fuse settings with avrdude, arduino can not set the fuses to disable reset with a ordinary programmer it seems.

As for the programmer this worked with usbtiny and arduino as isp, and on my hvsp programmer.

somedude

Thank you very much, friend, for taking the time to reply and for the upload.

I used avrdude to directly flash the hex file from the site, then I set the fuses, all to no avail.
I even reset the fuses with a little hvp thing I made, then tried to blink all LEDs in sequence, just to ensure the avr is alive - it was.

If your file doesn't work either, I likely have a problem on the USB side, so I will check the Zeners and maybe tweak the pull-up resistor.
I already tried swapping the input wires and there was no activity, whereas before I was at least getting some sort of OS response in detecting the device.

Thanks again, I will post my results.

somedude

Swe-dude,


Please verify the USB side for me.
The sites I linked above differ from the littlewire site on the USB side big time.

Littlewire has:
D- with pull-up to pin 2
D+ to pin3

The other guys have:
D-with pull-up to pin 3
D+ to pin 2

D- is normally white and adjacent to VCC on the USB connector and D+ is green and adjacent to GND.
I point that out because I have seen other pinouts online.

Thanks again.


somedude

Just tried making a arduino boards.txt file for uploading littlewire and its working at least for me...

Try this just add the folder to your hardware folder, i used this with arduino (1.0.6 its easier to add extra boards there....)

This will load the littlewire hex file to a attiny 85, the reset will not work as i/o with these fuse settings but the programmer should be able to be recognized as a Usbtiny.

if its recognized i think you can change the fuse settings with avrdude, arduino can not set the fuses to disable reset with a ordinary programmer it seems.

As for the programmer this worked with usbtiny and arduino as isp, and on my hvsp programmer.
I tried it in 1.6.5 and I had 3 issues. I had to add a "read" section in avrdude.conf, I had to add lock bits 0x0F in boards.text for the bootloader and I still need to add the unlock fuse, but I'm not sure what to use.
Any idea for what to put as bootloader.unlock_bits in boards.text for 1.6.5? Many other boards have 0x3F but I don't know where that came from. After some googleing it seems to be programming the lock bits to 0x3F in preparation for the upload, only to in program then back to 0x0F afterwards. I have to look at the data sheet for t85 to see if 0x3F would be right.

And thank you very much for the link to the diagram. I will try to make sense of the USB connector, as I am using a cut cable. But that validates the D- to pin 2 as for little wire. The pull-up on D- designates it as a low speed device at 1.5Mbps, which also makes sense.

Thanks again.

Edit: SOLVED: The stupid pull-up resistor REALLY needs to be 1.2K, even for 5V. All references to 1.68K and 1.8K at 5V were wrong, at least in my case. 1.2Kohm did the trick - the device is recognized and I was able to upload the fade sketch to my mega 2560 with it.
I still wasn't able to load the bootloader using said arduino, as it throws a mismatch, but at least it works. I might have to try to tweak the upload rate for that to work.

Oh yeah - TRY MULTIPLE USB ports!!!
I had an extension cable on my desk plugged into an USB 3.0 port and it has trouble with the device.
The other ports at the front of the case worked, one of them being 2.0, so do not just try one USB port! hehehe

Thank you very much swe-dude for your help, it was invaluable!
All the best.

Go Up