You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When selecting buffered PWM on PB0-2 or PB3-5 (any of the buffered options in the menu) the PWM cannot be set to 0% or 100%. If you are anywhere in between and try to set the PWM to either 0 or 255 it will not change the PWM value at all.
Using digitalWrite to set the pin to on or off doesn't work either.
Unbuffered PWM appears to work fine.
I have tested this on a 3227 and a 3217 (Curiosity Nano board) running at 8Mhz and with all other MegaTinyCore options at their defaults.
I used the code below, and an oscilloscope to monitor the output.
int pwmPin = PIN_PB0;
void setup() {
// put your setup code here, to run once:
pinMode(pwmPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
analogWrite(pwmPin, 128);
delay(1000);
analogWrite(pwmPin, 254);
delay(1000);
analogWrite(pwmPin, 255);
delay(1000);
digitalWrite(pwmPin, 1);
delay(1000);
analogWrite(pwmPin, 128);
delay(1000);
analogWrite(pwmPin, 1);
delay(1000);
analogWrite(pwmPin, 0);
delay(1000);
digitalWrite(pwmPin, 0);
delay(1000);
}
The text was updated successfully, but these errors were encountered:
When selecting buffered PWM on PB0-2 or PB3-5 (any of the buffered options in the menu) the PWM cannot be set to 0% or 100%. If you are anywhere in between and try to set the PWM to either 0 or 255 it will not change the PWM value at all.
Using digitalWrite to set the pin to on or off doesn't work either.
Unbuffered PWM appears to work fine.
I have tested this on a 3227 and a 3217 (Curiosity Nano board) running at 8Mhz and with all other MegaTinyCore options at their defaults.
I used the code below, and an oscilloscope to monitor the output.
The text was updated successfully, but these errors were encountered: