PDA

View Full Version : Audio CODEC



Aldo
11-13-2010, 01:52 PM
I searched OBEX but not found a CODEC for telephone communication, something like speex...

I will try to interconnect the propeller to this board :

http://www.semiconductorstore.com/pdf/newsite/silvertelecom/Ag1171v1-3.pdf

Wich is a cheap and simple subscriber line interface.

While at it i looked at the reference circuit at propeller manual and found audio in and out.

The pins connected to audio in/out are analog ones ? Or some kind of PWM/Comparator is being used ?

jazzed
11-13-2010, 06:57 PM
You have to use a few resistors and caps and 2 propeller pins to make an ADC with Propeller today.

Look into this for examples: http://www.parallax.com/Portals/0/Downloads/appnt/prop/AN001-PropellerCountersv1.2.zip

Similarly, an analog audio output can be built with a resistor ladder DAC or even an RC circuit, but other specialized devices will provide better quality.

Leon
11-13-2010, 07:19 PM
I've interfaced the Si3000 speech codec with a dsPIC, it worked very well and was quite easy to use.

Aldo
11-15-2010, 03:29 PM
I'm no eletrical engenieer, so, while i researched a lot about the topic...

I ended up creating this schematic that i want to share :

75286

Is this ok ?

Im still afraid because prolly the line will output 0 to 1v peak audio, and this schematic will output 0 to 3.3v... (i need to read more about the AD7303 to see if the internal VRef can be programmed to 1V).

Well, generally, is this setup ok ?

Edit1: Found the first error, ADC0832 is a 5V only part...

Perry
11-15-2010, 11:03 PM
What is your project aim. (compete with MagickJack?)

You could get started with "microphone to headphone" object.
I thought there was also DTMF or touch tone object somewhere.

Perry

ericball
11-16-2010, 08:09 PM
I searched OBEX but not found a CODEC for telephone communication, something like speex...

I will try to interconnect the propeller to this board :

http://www.semiconductorstore.com/pdf/newsite/silvertelecom/Ag1171v1-3.pdf

Wich is a cheap and simple subscriber line interface.

While at it i looked at the reference circuit at propeller manual and found audio in and out.

The pins connected to audio in/out are analog ones ? Or some kind of PWM/Comparator is being used ?

Looking at the datasheet, the "codec" they are indicating is simply the audio input & output. So this could be a normal mic/speaker (for analog) or an ADC/DAC (for digital).

The sample "microphone to headphone" object uses a counter and two pins to create a delta/sigma ADC then uses a second counter to output PWM to two pins (normal & inverted). Crude but functional.

AFAIK no-one has implemented a true audio codec for the Propeller. Audio processing does have the advantage of (relatively) low sample rates, but the codecs often require multiplications and floating point - neither of which the Propeller has.

Aldo
11-16-2010, 08:51 PM
Rebuilt the schematics :

75347

After thinking a lot about this i think that due to the capacitive coupling i will have no problems (i can simple increase/decrease output/input volume in software if needed).

Now i will do the PCB.

I decided to do DTMF decoding in software.

I'm going for a software PLL approach.

Edit:

Theres a much simpler FFT algorithm here :

http://propeller.wikispaces.com/FFT

And i would really need filtering the audio input to the ADC (as least a high pass filter to the ground).