I don't have a problem programming and reprogramming a brand new Tiny45 using a new Atmel-ICE or an AVRISP Mk2, but when I have been debugging a program, I get
Unable to connect to tool AVRISP mkII (000200150470)
and other error messages when I try to program the chip, using both the ICE and AVRISP. I think it's something to do with the fuses, and vaguely remember having this problem previously with a Dragon, but can't remember what I did. I've tried disabling DWEN and enabling the internal oscillator (no crystal), but that doesn't help.
Has anyone got any suggestions?