Tones with a PIC

Thread Starter

Xadrian

Joined Jun 19, 2010
1
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.
 

retched

Joined Dec 5, 2009
5,207
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! ;)
 
Top