Possible bug in tone() for ATTiny1604 #362
Unanswered
hamsterdave
asked this question in
Q&A
Replies: 3 comments 1 reply
-
Issue created - described behavior is clearly wrong. I never use tone myself so it;s not surprising that a bug with certain applications of tone() got into the core. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Somehow I missed this over in discussions, Issue link is #369 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Current changelog entry has grown to:
It has clearly been many years since someone properly worked over that code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It seems there's a bug in the tone() function on the ATTiny1604 (possibly others, I don't have any others handy to test on at the moment). If you call the tone function with a duration specified:
tone(TONE_PIN, 440, 500);
It doesn't actually generate a tone output, it just toggles the specified pin high for the specified duration and then low again.
If you call the function with no duration, it generates the tone as it should, however if you then call noTone(); it stops generating the tone output, but it leaves the pin high, pumping DC into the speaker coil. The pin has to be manually set low again following noTone();
Beta Was this translation helpful? Give feedback.
All reactions