Skip to content

tone command does not work correctly on ATmega8 [imported] #292

New issue

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

Closed
cmaglie opened this issue Nov 15, 2012 · 2 comments
Closed

tone command does not work correctly on ATmega8 [imported] #292

cmaglie opened this issue Nov 15, 2012 · 2 comments

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 292 moved from a Google Code project.
Added by 2010-07-15T07:34:09.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

What steps will reproduce the problem?

  1. load and run a tone example script, f.e. toneMelody.pde

What is the expected output? What do you see instead?

You can hear the melody correctly on a Arduino Duemilanove with ATmega328.
On a board with ATmega8 you can only hear one tone (NOTE_B3 I think??).

What version of the Arduino software are you using? On what operating
system? Which Arduino board are you using?

Arduino018 on Windows 7. myAVR USB MKII board with ATmega8 3.6864MHz Quarz.

Please provide any additional information below.
Only the following frequencies give a correct signal: 61Hz, 244Hz, 976Hz, 3.9KHz. Any other frequency gives no signal (PWM output signal measured with oscilloscope)

@ffissore ffissore added the New label Feb 27, 2014
jan-r added a commit to jan-r/Arduino that referenced this issue Apr 10, 2015
Rebased the bugfix from the original Google Code issue arduino#292 to work with Arduino 1.6.x

Description of original fix provided by Pete62:
The later 8 bit AVR's use two registers (TCCRxA, TCCRxB) whereas the ATmega8 only uses a single register (TCCR2) to house the control bits for Timer 2.  Bits were inadvertently being cleared.
@jan-r
Copy link
Contributor

jan-r commented Apr 12, 2015

A fix for this issue has been proposed, see pull request #2961.

jan-r added a commit to jan-r/Arduino that referenced this issue Apr 13, 2015
Replaced direct register manipulation with calls to bitWrite(). Fixed TIMSK5 usage on Leonardo (as well as some other preprocessor statements).
@facchinm
Copy link
Member

PR #2961 merged

oriregev added a commit to oriregev/Arduino that referenced this issue Apr 27, 2015
* upstream/master: (239 commits)
  Fix for issue arduino#292
  Windows: build_pull_request needed to be upgraded as well
  Update revisions.txt
  Windows: JRE is chosen at build time via WINDOWS_BUNDLED_JVM property
  Update Tone.cpp
  Update revisions.txt
  Block discovery threads until packages is not null, otherwise boards discovered during startup will miss model name
  Also SerialDiscovery was affected by bug found at 40535df. Fixes arduino#2892
  NetworkDiscovery was silently failing because packages werenìt ready yet. Fixes arduino#2837
  Better preference for setting warnings level. See arduino@61592d7#commitcomment-10668365
  SAM boards stop compiling due to way of handling params with spaces on different OSs. Fixed
  Update Tone.cpp
  Restored error messages. Got rid of MessageSyphon as ther were losing some error messages. Fixes arduino#2737
  Windows: added listComPorts test case
  New preference: enable all compiler warnings, off by default. Fixes arduino#1728 and arduino#2415. Also affects arduino#2634 and arduino#2207
  build.xml: spreading failonerror on all exec tasks, it's better to crash early
  Lib/Board Manager CRC check is now case insensitive. Fixes arduino#2953
  License fix to audio library
  License fix
  Library Manager: better error message
  ...
tbowmo pushed a commit to tbowmo/Arduino that referenced this issue Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants