1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

connecting 8052 to adc and dac

Discussion in 'Embedded' started by CAFxX, Dec 22, 2003.

  1. CAFxX

    CAFxX Guest

    i was wondering how to connect an adc and a dac to a 8025 (DS89C420). do i
    have to use the two UARTs or it's better to use the "raw" i/o pins? what i'm
    trying to do is a sort of audio filter: the signal is converted in digital,
    read by the 8052 (where the fx are applied), and sent to the dac.
    moreover i'm using BB's PCM1802 as the ADC and PCM1744 as the DAC. the
    problem is these are all stereo adcs and dacs. do anyone knows about
    audio-oriented mono adcs and dacs?
    thank you for your help, CAFxX.
    CAFxX, Dec 22, 2003
    1. Advertisements

  2. CAFxX

    Ian Bell Guest

    You need to check some basic maths first. The PCM1802 I believe operates at
    96KHz sample frequency and 24 bits. Assuming you can use a serial input
    and take three lots of 8 bits for each 24bit sample then you need to
    receive three samples every 1/96KHz secs or 8 bits every 3.5 microseconds.
    That's pretty damn fast for an 8051 but within the speed of the DS89C420
    assuming the serial ports can go this fast.

    On this basis I would say bit bashing via raw i/o ports is definitely out
    and your best bet would be the serial ports.

    Ian Bell, Dec 22, 2003
    1. Advertisements

  3. CAFxX

    Mike Turco Guest

    Off the cuff, this sampling rate and resolution sounds like one hell of an
    overkill for audio. Audio CD's are sampled at 16 bits, I think, and not
    nearly at such a fast frequency. Also, processing and re-outputting the
    audio through a ADC at 96K doesn't sound realistic, although it might be
    with a super-fast 8052. What are the norms for audio recording and
    processing, in regards to resolution and sampling freq? -- Mike
    Mike Turco, Dec 22, 2003
  4. Audio CD's are 16 bits at 44.1KHz, but 24 bit @ 96KHz doesn't
    sound unreasonable to me, for professional gear used in studios.

    SACD, super audio CD for the home user, is 1 bit at 2.8224MHz,
    yes MHz. That's even more information pumped through. I have
    no idea what mastering equipment for SACD uses.

    Anyway, I don't know what a fast 8052 can do here. Even if it
    is capable reading/updating the ADC/DAC, what can be done
    with the audio bits, in the time left...
    Frank Bemelman, Dec 22, 2003
  5. CAFxX

    Jim Stewart Guest

    Except that 24 bits is a s/n ratio of 144db.
    I wouldn't be able to make a piece of wire
    have a s/n ratio of 144db :)
    Jim Stewart, Dec 23, 2003
  6. Me neither ;)
    Frank Bemelman, Dec 23, 2003
  7. CAFxX

    Mike Turco Guest

    Perhaps this is a product for people with very discerning ears ,~)

    The poster did ask for suggestions.

    Microchip makes a line of ADC's, and a simple DAC is just a bunch of
    resistors. If the OP would be more specific about what it is he is trying to
    accomplish, that would lead to better suggestions.

    Mike Turco, Dec 23, 2003
  8. CAFxX

    Ian Bell Guest

    1bit @ 2.883MHz *is* 24bits @ 96KHz, that's what SACD uses.
    The 8051 the OP specified has a 30nS instruction cycle - it's the fastest
    8051 around.

    Ian Bell, Dec 23, 2003
  9. CAFxX

    Ian Bell Guest

    I thought he was quite specific. He wants a single channel of audio in,
    apply effects to it in the digital domain and send the result to a DAC to
    recreate analogue audio. The 24bit/96KHz bit only came about because I took
    the trouble to look up the chip he said he was looking at using.

    Ian Bell, Dec 23, 2003
  10. CAFxX

    Mike Turco Guest

    I meant specific in terms of quality. I used to work in the toy industry and
    "quality" often meant "barely intelligible".
    Mike Turco, Dec 23, 2003
  11. CAFxX

    Ian Bell Guest

    Me too and it still is.

    Ian Bell, Dec 23, 2003
  12. Use an Analog Devices ADuC816 instead, it has both the ADC and DAC
    onboard. Or some other processor that contains both and avoid having to
    interface separate components.
    Albert Lee Mitchell, Dec 23, 2003
  13. I meant specific in terms of quality. I used to work in the toy industry
    That's why they print the word bubbles on the packaging. Many toys, I
    can't understand what the hell they are saying. If I see the word
    bubbles, that gives my audio processing firmware a list of possibles
    and with those in memory, I can always guess what phrase is actually
    being spoken.
    Lewin A.R.W. Edwards, Dec 23, 2003
  14. CAFxX

    CAFxX Guest

    first of all thank you for your replies.
    as ian pointed out i just wanted to build a sort of multi-effect processor
    for mono audio signals.
    the adc and dac actually do have a 24/96 resolution (even 24/192 fot the
    adc) but they also support 24/48 and 24/44.1 so i wouldn't mind that. the
    problem simply was how to connect them (they all are serial, but they do
    have the data pin, the data clock pin and the l/r clock pin (since they all
    are stereo)).
    i took a look at analog device's microconverters but their DACs only works
    at 12bits. otherwise they would have been perfect. maybe there are other
    solutions around but i didn't find them. if someone knows them...

    thank you very much, CAFxX.
    CAFxX, Jan 14, 2004
  15. CAFxX

    Andy Peters Guest

    Yep, they're all stereo. (Or they have multiple pairs!)

    Why don't use choose a DSP that has built-in I2S ports? In that case,
    you might actually be able to do something interesting.

    Another option is to use a simple CPLD that takes I2S in and gives you
    parallel out, and parallel in to I2S out. If you're clever, you can
    figure out how to extract only one of the channels, and if you're even
    more clever, you'll realize that you can grab the 24-bit data in 8-bit
    chunks, so you don't need 48 bits of shift register. If you do it
    this way, you're also not wasting your micro's time bit-banging a
    couple of I/O ports.

    I still think a DSP is the right way to go.

    Andy Peters, Jan 15, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.