Tones with a PIC

Discussion in 'Embedded Systems and Microcontrollers' started by Xadrian, Jun 19, 2010.

  1. Xadrian

    Thread Starter New Member

    Jun 19, 2010
    1
    0
    Hello. If you've succeded on making that project work, pls send the source code and the schematic to me. I have to make the same project and i'm a noob in this area.
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Are you trying to use the same PIC? The PIC16F877?

    If so, you should look through the data sheet and pay particular attention to the PWM areas.

    Also, depending on the compiler you are using, there should be a template for the PIC to set up the initial settings for oscillators, timers, watchdog, etc.

    That is the biggest part. Once you have the PIC set up properly, it really is as easy as sending the PWM command/signal to the proper pin where the speaker or piezo is connected.

    The next step would be to add buttons to change the frequency and/or the volume(amplitude) of the PWM signal.

    That would be setting the PWM dutycycle as variables in your code, then reading and debouncing the input pins where the buttons are attached to increase or decrease the values of those variables by a certain amount for each button press.

    The next step would be to add an LCD screen to display the frequency and amplitude of the PWM signal.

    The next step would be WORLD DOMINATION! ;)
     
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Have you tried Google. Of the top of my head I will try something like this->
    generate tones microchip
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
Loading...