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
Right now, you need to stop the timer, delay(1), and restart it to enable or disable PWM on a pin.
I would love to find a more graceful way of doing this, as it pulls in delay(), blocks for a millisecond, and makes a glitch on the other timer d pin.
I think if I moved the digitalWrite() tests for 0 and 255, and didn't use that shortcut for the timer d pins (and adjusted digital write to effectively analogWrite() the pin 0 or 255), I would get the desired behavior. If not in DS mode, maybe in a different mode - the different modes are very hard to understand from the datasheet. They clearly don't have people of the same caliber writing the datasheets now as they did in the classic AVR days.
The text was updated successfully, but these errors were encountered:
Right now, you need to stop the timer, delay(1), and restart it to enable or disable PWM on a pin.
I would love to find a more graceful way of doing this, as it pulls in delay(), blocks for a millisecond, and makes a glitch on the other timer d pin.
I think if I moved the digitalWrite() tests for 0 and 255, and didn't use that shortcut for the timer d pins (and adjusted digital write to effectively analogWrite() the pin 0 or 255), I would get the desired behavior. If not in DS mode, maybe in a different mode - the different modes are very hard to understand from the datasheet. They clearly don't have people of the same caliber writing the datasheets now as they did in the classic AVR days.
The text was updated successfully, but these errors were encountered: