Generating Random High/Low Sounds Using PIC Controller?

  • Thread starter Thread starter Pr0t0n
  • Start date Start date
  • Tags Tags
    Controller Random
AI Thread Summary
To generate random high/low frequency sounds using a PIC12F675P controller, one can utilize bit-banging on a GPIO pin at audio rates. Implementing a random number generator is essential for determining frequency and duration, with an LFSR algorithm being a recommended approach. For more complex waveforms beyond simple square waves, additional methods must be explored to achieve the desired sound quality. Connecting the PIC to a DTMF chip or implementing a simple modem with external filters may enhance sound accuracy. The approach taken will depend on the specific sound fidelity required, such as mimicking a dial-up modem.
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.
 
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...

Similar threads

Back
Top