Hi, i have a problem with an attiny85 when using both PWM outputs.
Configured everything from this article using the Tiny AVR Programmer:
https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide/
This is my sample code:
int led0 = 0;
int led1 = 1;
void setup() {
pinMode(led0, OUTPUT);
pinMode(led1, OUTPUT);
}
void loop() {
analogWrite(led0, 50);
analogWrite(led1, 50);
delay(1000);
analogWrite(led0, 250);
analogWrite(led1, 250);
delay(1000);
}
So in short it should light up 2 LEDS and vary its light intensity every 1 second.
Pretty simple sample that works on an Arduino with no issues.
On an ATTiny85 the LED's flicker, both on 1mhz internal clock and 8mhz internal clock, if i disconnect one LED from the PIN it works again, the problem is only when both are in use.
Tried BlinkWithoutDelay to not use Delay function, it didn't solve the problem.
I dunno why this is happening, I've seen samples on using the ATTiny85 to control an RBG LED using 3 PWM's i cant seem to work with 2.
Here is a video to demonstrate
http://1drv.ms/1AD8OeH