We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PWM for ATtiny841 works with 1.5.2 but not with 2.0.0
Here's the code I'm running. Selecting the digitalWrite version works for both cores; the analogWrite version works for 1.5.2 but not 2.0.0
#define PIN_LED_INDICATOR PIN_PB2 #define FADEON #define OSCCAL_REG_NAME OSCCAL0 //841 uses OSCCAL0; others use OSCCAL void setup() { OSCCAL_REG_NAME = 0x1D; //tuned for this particular part #ifdef FADEON pinMode(PIN_LED_INDICATOR, OUTPUT); analogWrite(PIN_LED_INDICATOR, 200); #else pinMode(PIN_LED_INDICATOR, OUTPUT); digitalWrite(PIN_LED_INDICATOR, HIGH); #endif Serial.begin(19200); delay(100); Serial.println(F("Welcome to BareChip")); } void loop() { stdBlink(); } void stdBlink() { #ifdef FADEON analogWrite(PIN_LED_INDICATOR, 64); delay(1000); analogWrite(PIN_LED_INDICATOR, 200); delay (1000); #else digitalWrite(PIN_LED_INDICATOR, LOW); delay(200); digitalWrite(PIN_LED_INDICATOR, HIGH); delay(800); #endif }
The text was updated successfully, but these errors were encountered:
Confirmed.. not seeing PWM on my basic LED setup. Commit that broke PWM: 6152259
I've proposed a fix here: https://github.com/ahshah/ATTinyCore/tree/Tiny841_PWM_Fix Please sync and test it and confirm it works. Once you do I can create a pull request.
Sorry, something went wrong.
No branches or pull requests
PWM for ATtiny841 works with 1.5.2 but not with 2.0.0
Here's the code I'm running. Selecting the digitalWrite version works for both cores; the analogWrite version
works for 1.5.2 but not 2.0.0
The text was updated successfully, but these errors were encountered: