Digistump Forums
The Digispark => Digispark (Original) Support => Topic started by: LaserDave on April 28, 2019, 10:17:49 pm
-
So, I installed the IDE on Win10, drivers were successful etc. etc., and I was able to program different variations of the Blink routine, including a simple chaser for LEDs.
Everything was working perfectly until I mistakenly attempted to make a chase sequence, it attempted to program the device but it would never work properly again. The very second I plugged in the USB after being instructed to do so, it immediately causes Windows to complain about "Device Not Recognised", then proceeded to run the program that was in it from earlier. I wanted to verify if the Reset was enabled or not, so I briefly touched P5 with a 1k resistor connected to ground, which reset the chip and the program began again after a 5-second delay.
Worried, I tested the setup with the exact same configuration with another DigiSpark, I used the 1-2-3 chaser sketch and plugged it in, it worked perfectly and I can continue to program it normally. Windows and the drivers act normally, everything runs perfectly.
From the MANY, MANY articles and tutorials I've read over the past three days, it would SEEM that the RESET fuse has been changed, but I would have to disagree since it seems to take a lot of dedicated work to set fuses. My thought is that the partial change to one of the pins that deal with USB signals has been altered, since RESET can be easily invoked, so it must be something simple that prevents USB communication (I hope).
I realise that these devices are very cheap and not worth the time to fix it, but I'm more interested in what happened to prevent similar mistakes and how to recover from them.
Sorry for the long post, I felt it best to provide as much detail as possible, and hopefully get some help.
~Dave
---------
Here's the script that caused the trouble.
// initialize the digital pin as an output.
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(0, HIGH);
digitalWrite(5, LOW);
delay(500);
digitalWrite(1, HIGH);
digitalWrite(0, LOW);
delay(500);
digitalWrite(2, HIGH);
digitalWrite(1, LOW);
delay(500);
digitalWrite(3, HIGH);
digitalWrite(2, LOW);
delay(500);
digitalWrite(4, HIGH);
digitalWrite(3, LOW);
delay(500);
digitalWrite(5, HIGH);
digitalWrite(4, LOW);
delay(500);
}
-
I know that this is overly simple, but did you try removing all of the added circuitry (LEDs, resistors, etc.) and test it again?
-
@granzeier Of course, I removed everything that could influence operation, double checked voltages, deleted and reinstalled drivers then rebooted the computer. After everything was double and triple checked, it was tested again - same results, then immediately swapped it out for the other device which functioned and programmed perfectly.
Can fuses actually be changed by merely declaring a pin an output, then writing to it?? My hours of research would indicate that fuses need to be deliberately set using a somewhat more elaborate procedure.
-
Hmmm, Yes, I would think that the fuses should not be so easy to change, also. Unfortunately, I have also seen this kind of stuff. I have a small pile of non-functional arduinos (Digisparks, minis and micros) which is labelled "reflash." I'm not sure what to say, except to try to reflash the '85 with the bootloader and try again.