Depends what fuse you screwed up. If ytou disabled SPI, then you do need an HV programming method. Not HVPP. HVPP requires at least 16 pins in addition to power and ground, the attiny 85 (and 84, and 841, and - literally - nothing else) doesn't have enough pins! They bodged together this thing they called HVSP. The big nice thing about it is that it requires "only" 6 I/O pins on a tiny85 (ie, every pin, but far better than HVPP, which would need ten pins that don't exist, and those are very hard to connect to.
HVSP also is sort of a symphony of simplified cases:
- There are only 6 pins on 85, and I think 8 or 9 (extra pins just being held low to enable it, maybe to make it difficult to do in circuit. I think both of the classic AVR HV modes were intentionally made onerous to use, and impossible to use in circuit on purpose, to throw more obstacles in front of people trying to clone their customers' products, or who want to reprogram hardware which the manufacturer doesn't want reprogrammed.
- There are only a grand total of 8 parts in across three part families that use HVSP, and they're pretty popular, and people are more likely to disable reset on a t85 due to pin pressure.
- If you consider the unbricking case, you realize that you can guarantee that the fuses aren't blocking ISP programming by using HVSP to write LFUSE to 11100010 (8 MHz internal), HFuse to 1101S111 (S = EESAVE, ) and 0x255 to efuse (ie, the factory standard values except with the clock at 8 meg, to speed up the search.
That is fantastically easier than implementing the general protocol... Look at this madness.... So, you have three lines under your control that are part of the data transmission, One is a clock. The protocol is grouped into units of 11 bits. The first bit and last two bits are always a low on both data lines. the remaining byte is the actual data. And get this, remember how I said there were two data lines controlled by the programmer? Yeah for every clock pulsea bit is clocked into the target from each line, A high fuse write of 11010111 would mean
SDI
0-0100-0000-00 0-1101-0111-00 0_0000_0000_00 0_0000_0000_00
SII:
0-0100-1100-00 0-0010-1100-00 0-0111-0100-00 0_0111_1100_00
As you can imagine, since the three sets of parts can all be restored with the same command, you don't have to implement the full protocol for the general case if all you intend to di is unbrick things. Then it would just need to make it enter programming mode, then send 132 bits on 2 data lines while pulsing the clock. it would be hard to make that not fit in 2048b of flash if you tried, so people would take ATtiny2313's, 12v doorbell battery for the HV, switching the hv with a pair of transistors.
You can find plans for HV debrickers like that online. I don't believe I ever saw an HVPP one though.
But, if all you did was screw up the clock source and set it to a crystal or external clock that isn't present, you don't need to do anything nearly that sophisticated. Take another microcontroller and either set it's clockout fuse (takes manual avrdude invokation) or grab timer1 on something that's not a tiny85, set it to fast PWM mode, the option where it takes ICR1 as TOP. and then set the compare values to either 1 and 3 or 0 and 1, the first one should definitely make PWM a quarter of the system clock. The second one if it works (I forget how low you can crank the period back to on those) gives PWM at half system clock. Or just do a cli; while (1) {PINx |= 1 << (bit position);}
which should also be 4 clocks per bit (you do need to cli() to kill interruptsbefore the while loop if bitbanging the clock like that). However you get this MHz speed clock signal from a working AVR, connect it to XTAL1 on the target after disconnecting anything else from that pin, If set to use clock or external crystal, and the "jumpstart" AVR is running at the same voltage and shares a common ground and such, you should now be able to use an ISP programmer on it while it's being clocked from the other signal, and set it to use the internal oscillator, after which the jumpstarter is no longer needed.