sound generation

how can i produce a sound of particular frequency using 89c52
i want to know the commands in c51 compiler(asembler code).....i need it very urgently...........plz help

Parents
  • There are no such command.

    But you can generate sound in the same way the original PC did it - by toggling a digital pin at a fixed frequency, and feeding this signal to a speaker.

    Take a look in the datasheet about the timer/compare features of your chip.

    If you use Pulse Width Modulation (PWM) you can low-pass-filter the signal and generate an analog signal. Check for available application notes, and keep your eyes open for funny features when reading the datasheet.

Reply
  • There are no such command.

    But you can generate sound in the same way the original PC did it - by toggling a digital pin at a fixed frequency, and feeding this signal to a speaker.

    Take a look in the datasheet about the timer/compare features of your chip.

    If you use Pulse Width Modulation (PWM) you can low-pass-filter the signal and generate an analog signal. Check for available application notes, and keep your eyes open for funny features when reading the datasheet.

Children
More questions in this forum