Frequency change to make sound different

Started by Sir_Lucious, April 07, 2007, 01:02:30 AM

Previous topic - Next topic

Sir_Lucious

I need help finding how I can change the frequency of the internal speaker so I can make the sound go from a higher frequency to a lower one and viceversa. Any help would be great.

Sir_Lucious

Just in case I'm a beginner , I 'm a Computer Engineering student so I do not want you guys just to give me the code, not to be harsh, but  I want to know how i can change it, I want to learn :bg. Just to be sure. Thanks

MichaelW

System timer 2 is used to drive the internal speaker. Timer 2 is programmed for mode 3, periodic square wave, and loaded with a 16-bit initial count that is calculated as the timer input frequency (1193182Hz) divided by the desired output frequency. I posted some code that does this here:

http://www.masm32.com/board/index.php?topic=6790.0

The code that sets up system timer 2 is located in the InitFastTimer procedure in fast_tmr.asm, and the code that controls the timer gate and routes the output to the speaker in the Beep procedure in beep.asm.
eschew obfuscation