View Full Version : DigiSpark and ATTiny45 behaving quite differently..

September 15th, 2016, 10:13 PM
This centered around the PWM functionality of ATTiny via ArduinoIDE.. let's say I have a very simple program with pinMode(0, OUTPUT);
the loop
analogWrite (0, 100);

And I'm getting huge flicker from the ATTiny (http://www.kynix.com/Search/ATTiny.html). And the "Fade" example, and etc. It does handle digitalWrite fine so far. Meanwhile, the DigiSpark, on the same pin and code, runs like Arduino. From what I can tell, Arduino as ISP is working great. I followed the trail of crumbs and burned ATTiny bootloaders to run at 8mhz and 16mhz internal PLL clock, respectively. From 1 to 8mhz, the delay intervals did change noticeably. I changed the time durations even trying millis(). And it obviously sounds fairly digital via Ohmmeter.

So before I surrender and buy the mini brick of digisparks, can someone give me an idea on some different tests or workarounds? I'm tentative to dive into C if I can get away with DigiSpark.. but I'm definitely curious.

I've tried 3 ATTiny's from same batch with same result.