Shop OBEX P1 Docs P2 Docs Learn Events
Audio CODEC — Parallax Forums

Audio CODEC

AldoAldo Posts: 9
edited 2010-11-16 12:51 in Propeller 1
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 ?

Comments

  • jazzedjazzed Posts: 11,803
    edited 2010-11-13 10:57
    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.
  • LeonLeon Posts: 7,620
    edited 2010-11-13 11:19
    I've interfaced the Si3000 speech codec with a dsPIC, it worked very well and was quite easy to use.
  • AldoAldo Posts: 9
    edited 2010-11-15 07:29
    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 :

    analog inout.pdf

    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...
  • PerryPerry Posts: 253
    edited 2010-11-15 15:03
    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
  • ericballericball Posts: 774
    edited 2010-11-16 12:09
    Aldo wrote: »
    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.
  • AldoAldo Posts: 9
    edited 2010-11-16 12:51
    Rebuilt the schematics :

    tel interface.pdf

    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).
Sign In or Register to comment.