melody generation by MCU

Status
Not open for further replies.

Noman Yousaf

Full Member level 4
Joined
Nov 19, 2003
Messages
208
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Lahore Pakistan
Visit site
Activity points
1,763
i want to generate any attractive, simple melody by AT89C2051. please guide me or tell how to generate melody by MCU

regards
 

A square wave is the easy way to generate a pitch, at any frequency in the audio spectrum.

You probably want to use 12 notes per scale (as is commonly in use today). You must match each pitch to its frequency as generated by your mcu. You must program the correct loops, delays, etc.

To create a melody, you will output a frequency for a suitable time period, then you will change to the next frequency, etc.

Your sound will probably be pulsed DC. To convert it to AC, put a DC blocking capacitor on the output wire. You may or may not need to amplify it. Avoid drawing overmuch current from the output, or exposing it to static charges.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…