vdudouyt / minipro

An open source program for controlling the MiniPRO TL866xx series of chip programmers
383 stars 77 forks source link

Add fuse support for ATtiny85 #84

Closed LightningStalker closed 6 years ago

LightningStalker commented 7 years ago

Other protocol 0x73 devices can now be added as well, as they are tested. The case statement beginning on line 550 of main.c may be expanded to contain the relevant select code for each variant.

Remove whitespace

LightningStalker commented 7 years ago

msg[2] must be 0x03 in order to read the extended fuse byte. Still deciding how to implement this without breaking the other micros

chenz commented 7 years ago

All the whitespace damage in this PR makes it quite annoying to read. And then, in the one place where actual code was changed, you got the indentation wrong.

ATtiny85 has three fuse bytes (+lock), so maybe it should be avr3_fuses instead of avr2_fuses?

LightningStalker commented 7 years ago

ATtiny85 has three fuse bytes (+lock), so maybe it should be avr3_fuses instead of avr2_fuses?

@chenz @kutis96 That is correct. See above comment and minipro.c line 147

chenz commented 7 years ago

I see now what you mean. Using avr3_fuses gives:

IO error: expected 10 bytes but 9 bytes transferred

(expects 7 (header) + 3 (fuse) bytes, but device reads only 9 bytes)