i want to wire a little prototype for a project, so i have to reprogramm the attiny pretty often...
but now i got an issue with the digispark pcb of the attiny, the one you can put directly into an usb port.. i used the usb pins for pins to work with (one for a led and one for a button read)... and now windows dont recognize it no more, maybe because i used the usb- for digital out? ^^'
I hope i can fix it or reprogramm it by using the arduino isp method? by using isp or some programmer boards (like one for the attiny only) i dont get such problem right?
and i got a bit scared if i use the attiny itself without the pcb and use all the ports for different things, i could block it for uploading later firmwares.. i use these little programmer boards from ebay.
Is there a programmatic way to reserve this pins to usb communication when plugged in by usb, and else using it, for let say led? Or a isp programming method that works with an uno or nano (the ones i tried burned my chips, tiny and uno... and chips are more and more expensive these days..)
I don't think ISP programming will help. I think either you damaged the chip, or at least the pins, when you used them as outputs, or you are connecting to USB with the other components still connected to the pins?
USB signals are high frequency, and if other components like LEDs are connected at the same time, I can imagine these other components could corrupt the signals enough so that USB communications is not possible.
If these other components are connected when you attempt USB communications, I would suggest disconnecting them to see if that helps.
No, for some of the reasons given in the previous reply #3. Not a practical way, anyway... the issue is, how would you detect when a USB is plugged in?
and i disconnect all pins when i plug it into the pc usb, i soldered on breadboard pins for faster prototyping.
on the breadboard i use pb4 (USB-) for led output.
later i planned to use this with its programmer board:
i dunno how to detect... i just thought if data comes from the USB+ maybe?
on setup if p3 (usb+?) active input of data enter empty loop, else execute main code?
seems that the benefit of the digispark pcb wont work if you need all pins, and a blank attiny could safe trouble and time..
When you upload a sketch with ISP programming, you overwrite the bootloader. It is the bootloader that manages the USB communications, so I guess that's why the PC/laptop no longer responds.
You now need to re-burn the Digispark bootloader. I don't know how to do that. But if you can do it, then you can disconnect any other components and re-try USB communications. If that will not work, my guess is that the chip is damaged.
i allways disconnect all components before uploading new programms.
and if a led is connected, no data input can be done, then it have to be attached, if no led is connected and data is comming, then all components have to be disconnected and it should be connected to a usb port.
so... do i understand right.. if i upload a blank programm to the tiny pcb via isp, i can upload a new bootloader with
or
and i should could it use as before like a fresh one?
I've done a bunch of projects with similar processors most of
=--
The only pin that is an issue with the Tiny85 is pb5 (reset). If you manage to use it as an output you need the hvsp mode of programming to 'revive' the chip, I believe.
I am not familiar with that board, I breadboard my attiny85's... so it may be useless information...
i only used the digispark because i thought it would save time... but now i will switch to the bare attiny85's if i get a inexpensive source for it.
you use all ports (except pb5 maybe) and it works every time uploading a sketch with icsp?
then i will do the same in future. the digisparks will be reburned with a bootloader and serve as rubberduckies or similar then xD
Generally it uploads ... when I design the entity, I try to take into account what pins do what. This makes sure I can wire into it the icsp header with a completely wired board.
On some of these I've wired it up to use the hvsp so I can use pb5... I generally have a diode in the pb5 lead so I can use the hvsp programmer on it...
I don't know what these cost where you are, but Digi-key has them for about $1.78 US
I purchase a lot of stuff from Mouser electronics, they have them for a few cents lower.
The shipping is usually about the same prices as a few components...
If you mess with these enough, including the Uno or a 328p a programmer for the device has paid for itself in my case... I've bricked a bunch of these and with the hv programmer, I can usually recover these chips.