App note: Tone Generation and Melody Player

Posted on Saturday, December 21st, 2013 in app notes by DP


Two application guides (Tone generation and Melody player) from Microchip to get you started on tone generation basics, these might help create musical greeting cards to give to your fellow geeks this coming holidays.

A general purpose resonator routine is implemented using a PIC17C42. This routine is used to generate multiple tones. A tone signal is normally generated using extensive table lookup schemes.When a multiple tone signal is desired, each tone must have its own lookup table, thus requiring a large amount of storage space, especially when various frequencies are to be generated. This application note implements tone generation using recursive techniques.

This entry was posted on Saturday, December 21st, 2013 at 1:00 pm and is filed under app notes. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

8 Responses to “App note: Tone Generation and Melody Player”

  1. Chuckt says:

    It says it is E.O.L. and it says you should consider the PIC17C42A which says, “Not Recommended for new designs” so what gives?

  2. Chuckt says:

    Is the PICSTART PLUS DEVELOPMENT SYSTEM the only programmer for it? $200 seems steep for a programmer for those two chips.

    • Tiersten says:

      The app note is just a guideline for how to implement something similar. You don’t need to use the exact uC they have in there. The 17C42 is very old was been discontinued years ago. The replacement is the 17C42A which isn’t recommended for new designs. The new recommended replacement is the 18F4220 which is supported by the low cost PICkit programmers.

  3. BuggieBottom says:

    So this is dangerous prototype circa December 2013. Rather than update you own projects or create some new ones you dig up a decade+ old app note to continue the mind numbing filibustering and make believe that you’re still real and relevant.

    Remember this site two – three years ago. Remember the forum – how active people were. Where are they all now.

    Look at all the work that went into making DP and how it is now all so wasted…

    • Chuckt says:

      I’m very thankful for the decade old app. I will be experimenting. It is very relevant.

      • BuggieBottom says:

        Well if you are grateful for a link to a decade old app for a micro that is discontinued and is only supported by obsolete programmers costing $200+ I would hate to think how you would feel about relevant updates to the projects that dangerous prototypes produced, sold and made commitments, both implicate and explicit about.

    • Ian says:

      Criticism taken. Filip, who’s been doing our appnotes for the past year or so, moved on to a great new job (post forthcoming) and we’re all chipping in to pick up the slack. I’m in China trying to figure out what the hell to do with a tiny operation run on a shoestring, like Dangerous Prototypes, and I believe we’re on track to have some great new projects but its taking a ton of time and effort. I feel the creep towards irrelevancy in an ever more crowded space as well, but sales keep going up, we have doubled our distributors, and readership goes up every month. I’m hanging on tight waiting for the new stuff to drop, but you’re right, I’ve traded my constant presence on the blog and forum for actually doing business stuff and it sucks, but it’s what I feel have to do to keep everyone working with me sheltered and fed.

  4. Chuckt says:


    It is just an app. It represents something that hobbyists can do because it is retro. Most of the time we can’t do something because we have money restraints and the audience of Dangerous Prototypes can’t participate in a post because it is over the top and most posts are show and tell only.

    What is the real cost of making something good in electronics?

    Oscilloscope $400
    Diptrace $145 to $345
    Tools $100-$200
    Multimeter $50-60 range
    Manuals $50 a book
    Prototyping service ???
    Trainers / Boards

    We’re already over $1,000 dollars. It takes years for some hobbyists to learn and we’re handicapped by money, time and equipment.

    I read some of the tutorials and they are written on a learning curve so fewer people are learning than expected.

    Kudos for the app. Keep them coming as long as we are learning, please!


Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recent Comments

  • Max: A thing I wish I knew getting into Arduino-controlled servos is that the typical "180 degrees" servos DO NOT move 180 degrees for the standard...
  • Max: I have certainly noticed certain suppliers (like Adafruit, Pololu) being... "western-facing" - which is another way to say their prices definitely aren't Eastern Europe compatible,...
  • Shawn: Hello
  • jmarc78: Hello
  • JB: Hey.