Generating Random High/Low Sounds Using PIC Controller?

  • Thread starter Thread starter Pr0t0n
  • Start date Start date
  • Tags Tags
    Controller Random
Click For Summary

Discussion Overview

The discussion revolves around programming a PIC (PIC12F675P) controller to generate random high and low frequency sounds, specifically aiming for noises reminiscent of those produced by a dial-up modem. The conversation includes technical approaches, potential algorithms, and hardware considerations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests using a bit-banging method on a PIC IO pin at audio rates to generate random sounds, emphasizing the need for random number generation to determine frequency and duration.
  • Another participant mentions the use of an LFSR algorithm for generating pseudo-random numbers and provides a link to a resource on random number generators.
  • A different approach is proposed involving the use of a DTMF chip, which could simplify the sound generation process.
  • Concerns are raised about the accuracy of the generated sounds compared to actual modem sounds, with one participant questioning how closely the output needs to resemble specific baud rates.
  • There is a suggestion to implement a simple modem in the PIC with external filters to achieve the desired sound quality.

Areas of Agreement / Disagreement

Participants express a variety of approaches and opinions on how to achieve the sound generation, indicating that there is no consensus on the best method or the level of accuracy required for the sounds produced.

Contextual Notes

Limitations include the lack of clarity on the specific sound characteristics desired, such as frequency range and modulation techniques, as well as the accuracy needed in replicating modem sounds.

Who May Find This Useful

Individuals interested in sound synthesis, embedded systems programming, or those working with PIC controllers and audio applications may find this discussion relevant.

Pr0t0n
Messages
2
Reaction score
0
I'm new to the electrical engineering field and need guidance on how I can program a PIC (PIC12F675P) controller to generate random high/low frequency noises through a amplifier (TDA2822M). The sounds I'm aiming for need to be similar to those generated by a dial up modem.

I will appreciate any guidance I can get.
 
Engineering news on Phys.org
The simplest is to just bit-bang a pic IO pin at audio rates. Deciding what frequency for what duration to generate (ie, random) requires some sort of random number generators constrained to to provide numbers withing the frequency range and durations of the sounds you desire. If you want changing amplitudes, that would be a third number required. An lfsr algorithm will generated pseudo random numbers. See http://en.wikipedia.org/wiki/List_of_random_number_generators. Here is some PIC code for such a thing: http://www.dontronics.com/psbpix/random.html

If you want waveforms that are not simple squarewaves, then you need to determing how to generate the waveform you want.
 
Thank you meBigGuy! Let me see how far I can get with this now.
 
you could always hook it up to a dtfm chip.
 
My GPIO solution is pretty simplistic, but I don't know how accurate you need the sounds to be. That is, how much like a 1200 baud, or 2400 baud or whatever. The square wave won't sound exactly like a modem. thankz suggestion will sound exactly like a modem since it will be one. or, you can possibly implement a simple modem in the pic and some external filters to get the sound right. I don't know what you are really striving for.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
9
Views
2K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
5K
Replies
27
Views
6K
  • · Replies 14 ·
Replies
14
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K