connecting 8052 to adc and dac

Started by CAFxX December 22, 2003
hi,
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 wrote:

> hi, > 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.
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
"Ian Bell" <ian@ruffrecordsDOTworldonline.co.uk> wrote

> You need to check some basic maths first. The PCM1802 I believe operates
at
> 96KHz sample frequency and 24 bits.
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" <miketurco@yahoo-nospam4me.com> schreef in bericht
news:OzKFb.12539$7D3.12496@fed1read02...
> > "Ian Bell" <ian@ruffrecordsDOTworldonline.co.uk> wrote > > > You need to check some basic maths first. The PCM1802 I believe
operates
> at > > 96KHz sample frequency and 24 bits. > > 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
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... -- Thanks, Frank. (remove 'x' and 'invalid' when replying by email)
Frank Bemelman wrote:

> 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.
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" <jstewart@jkmicro.com> schreef in bericht
news:g6adnccAfOyJDXqiRVn-sQ@omsoft.com...
> Frank Bemelman wrote: > > > 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. > > 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 (:
Me neither ;) -- Thanks, Frank. (remove 'x' and 'invalid' when replying by email)
"Frank Bemelman" <fbemelx@euronet.invalid.nl> wrote in message
news:3fe79bef$0$195$1b62eedf@news.wanadoo.nl...
> "Jim Stewart" <jstewart@jkmicro.com> schreef in bericht > news:g6adnccAfOyJDXqiRVn-sQ@omsoft.com... > > Frank Bemelman wrote: > > > > > 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. > > > > 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 (: > > Me neither ;)
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
Frank Bemelman wrote:

> "Mike Turco" <miketurco@yahoo-nospam4me.com> schreef in bericht > news:OzKFb.12539$7D3.12496@fed1read02... >> >> "Ian Bell" <ian@ruffrecordsDOTworldonline.co.uk> wrote >> >> > You need to check some basic maths first. The PCM1802 I believe > operates >> at >> > 96KHz sample frequency and 24 bits. >> >> 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 > > 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. >
1bit @ 2.883MHz *is* 24bits @ 96KHz, that's what 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... >
The 8051 the OP specified has a 30nS instruction cycle - it's the fastest 8051 around. Ian
Mike Turco wrote:

> > "Frank Bemelman" <fbemelx@euronet.invalid.nl> wrote in message > news:3fe79bef$0$195$1b62eedf@news.wanadoo.nl... >> "Jim Stewart" <jstewart@jkmicro.com> schreef in bericht >> news:g6adnccAfOyJDXqiRVn-sQ@omsoft.com... >> > Frank Bemelman wrote: >> > >> > > 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. >> > >> > 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 (: >> >> Me neither ;) > > 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. >
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
"Ian Bell" <ian@ruffrecordsDOTworldonline.co.uk> wrote in message
news:3fe7f72a_3@mk-nntp-1.news.uk.worldonline.com...
> Mike Turco wrote: > > > > > "Frank Bemelman" <fbemelx@euronet.invalid.nl> wrote in message > > news:3fe79bef$0$195$1b62eedf@news.wanadoo.nl... > >> "Jim Stewart" <jstewart@jkmicro.com> schreef in bericht > >> news:g6adnccAfOyJDXqiRVn-sQ@omsoft.com... > >> > Frank Bemelman wrote: > >> > > >> > > 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. > >> > > >> > 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 (: > >> > >> Me neither ;) > > > > 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. > > > > 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.
I meant specific in terms of quality. I used to work in the toy industry and "quality" often meant "barely intelligible".