Hello Guys!
I have a weird problem with a DigiSpark (clone).
I program my Digispark with Visual Studio7 with installed MicroVisual extension.
This couple runs smoothly for all Arduinos I used (Uno, Nano, Micro, Mega) as well as with several ESP8266 derivates.
The step to Attiny85 and DigiSpark was not so easy, but I managed this with the help of some friendly users who had similar problems in the beginning. Now code for the DigiSpark is also generated in this environment.
Nota bene: VisualMicro is terrific in not changing anything in the sources, so it is possible to switch unhampered between VS7 and Arduino-IDE for compiling and downloading (I use both ways alternating (not regularly alternating

).
So far the intro, now the problem:
If I compile my program for an AtTiny85 @16MHz, all is well, no issues.
If I compile the unchanged sources for a DigiSpark (Default @16,5 MHz), I have problems when checking timings in the INT0 ISR.
The code analyzes the serial DCC signal coming in on pin 7 (PB2) and distinguishes between "0" (square wave with ~100 µs period) and "1" (square wave with ~60 µs period).
Nota bene II: Regardless of the methode used to download the resulting code onto the chip, if build target is "Digispark" the code doesn't work as expected, if build target is "AtTiny85 @16MHz", it works like a breeze.
Ok, there are diffenreces in code size, I think they come from different libraries, but that shouldn't result in busting the code.
"Different methods of downloading" means: I flash with "mySmartUSB light" or alternately via USB (micronucleus bootloader).
Having read about "issues with INT0" (in older versions of micronucleus) I changed the signal sampling from INT to PCINT0 (pin change int).
-> Same result, AtTiny85 code works, Digispark code doesn't.
Next idea I tested: Replace attachInterrupt() by manual register fumbling.
-> Same result, AtTiny85 code works, Digispark code doesn't.
As stated above, it is independent of the tool I use for compiling (VS7 od Arduino IDE) and independent of the download method (ok, the AtTiny85 has to be flashed with the programmer, every time, of course).
I did some oscilloscope work and found that the routine which distinguished between 60 and 100 microseconds, respectively, gets disturbed when Digispark is selected as build target.
Any ideas on the cause (and the remedy) for the given problem?
Thanks in advance!
[edit]
I forgot to mention, I already used micronucleus V1.06 (this version resided on the DisgiSparks when ordered) and V2.04.
Here no difference, too.
And I always use a Digispark as hardware.
[/edit]
Harry