DSPRelated.com
Forums

Interfacing the TLV2544 A/D to C5509 DSP

Started by mehdi hosseini September 16, 2009
Hi all
I am going to use the TLV2544 for reading 3 analog input which come from 3
microphone.
I want to read each channel periodically and whit specific sampling rate.
How can I do this task by using the DMA in C5509?
Thanks
--
Seyed Mehdi Hosseini
Seyed Mehdi Hosseini-

> I am going to use the TLV2544 for reading 3 analog input which come from 3
> microphone.
> I want to read each channel periodically and whit specific sampling rate.
> How can I do this task by using the DMA in C5509?

The TLV2544 seems to be a very old ADC chip. I found this doc showing how to interface it to the C31 DSP, which is
15+ year old DSP:

http://focus.ti.com/lit/an/slaa101/slaa101.pdf

I don't see that TI has used the device on any C55x DSK or EVM board. So that means there are not ready-to-run
software examples available for you to use.

I would suggest that if possible you use a newer multichannel ADC device, otherwise it's not likely that online TI
guys and other DSP developers can give you much support.

-Jeff
On Sep 14, 2009, at 02:40, mehdi hosseini wrote:
> I am going to use the TLV2544 for reading 3 analog input which come
> from 3 microphone.
> I want to read each channel periodically and whit specific sampling
> rate.
> How can I do this task by using the DMA in C5509?

Your question is more a question of how to use the TLV2544 than the
C5509.

If you go to the Texas Instruments web site and download the
specifications for the TLV2544, you'll see that it has the ability to
automatically sweep through either 2 or 4 channels, but not 3
channels. In order to use DMA, you'll probably have to read 4
channels and then skip over the data for the 4th input. This is the
"repeat sweep mode." The specs imply that you can cut the FIFO
short, which might allow you to read only 3 channels and not 4.
However, you should note that these modes require hardware support in
the form of additional electronics connected to the /CSTART and /INT
pins of the ADC. If you hardware does not have these signals
connected properly, then you cannot use DMA.

In all likelihood, you will be forced to use polling instead of DMA.
In this case you will read the McBSP to get the samples from the ADC
manually.

I suggest that you carefully study the TLV2544 specifications, then
confirm that your electronic circuit fully supports the available
modes in the way that you want to use them. From there, you can
determine whether the C5509 can operate its McBSP channel in DMA mode
or manual mode.

P.S. The sample rate is probably easiest to set using one of the
Timer resources on the C5509.

Brian Willoughby
Sound Consulting
>I am going to use the TLV2544 for reading 3 analog input which come from >3microphone.
>I want to read each channel periodically and whit specific sampling rate.
>How can I do this task by using the DMA in C5509?
>Thanks
>--
>Seyed Mehdi Hosseini
>
Thanks for your attention Jeff and Brian.
After more research about ADCs, Codec and Audio ADCs, I decided to use an Audio ADC or Codec such as PCM1870 or TLV320AIC12 which have microphone bias circuit and internal filter. These devices specially designed for audio task.
According to datasheets we can use 3 TLV320AIC12 in a bus for getting signals from 3 microphones, but there is some problem! I want to get samples on each microphone in the same time, I mean the synchronous sampling. There is no detail in datasheet about this.
How can I do this?
thank you.
--------------
Mehdi Hosseini
On Sep 24, 2009, at 09:46, s...@gmail.com wrote:
> After more research about ADCs, Codec and Audio ADCs, I decided to
> use an Audio ADC or Codec such as PCM1870 or TLV320AIC12 which have
> microphone bias circuit and internal filter. These devices
> specially designed for audio task.
The TLV320AIC12 is not recommended for new designs. The TLV320AIC12K
is similar, with a headphone amplifier, but that may be more than you
need.

> According to datasheets we can use 3 TLV320AIC12 in a bus for
> getting signals from 3 microphones, but there is some problem! I
> want to get samples on each microphone in the same time, I mean the
> synchronous sampling. There is no detail in datasheet about this.

The PCM1870 diagram implies that left and right are sampled
synchronously, but the data sheet does not mention how to precisely
control the timing of the sample acquisition. I did not take the
time to look at the TLV320AIC12x data sheets.

These questions are not really related to the C55x. You would
probably be better off signing up for the Texas Instruments Engineer
to Engineer forum at http://e2e.ti.com/ where they have forums for
analog-to-digital conversion.

Brian Willoughby
Sound Consulting
Mehdi-

>>I am going to use the TLV2544 for reading 3 analog input which come from >3microphone.
>>I want to read each channel periodically and whit specific sampling rate.
>>How can I do this task by using the DMA in C5509?
>>Thanks
>>--
>>Seyed Mehdi Hosseini
>>
> Thanks for your attention Jeff and Brian.
> After more research about ADCs, Codec and Audio ADCs, I decided
> to use an Audio ADC or Codec such as PCM1870 or
> TLV320AIC12 which have microphone bias circuit and internal
> filter. These devices specially designed for audio task.
> According to datasheets we can use 3 TLV320AIC12 in a bus for
> getting signals from 3 microphones, but there is some
> problem! I want to get samples on each microphone in the same
> time, I mean the synchronous sampling. There is no detail in
> datasheet about this.

I would guess that as long as all three (3) AIC12 (or AIC12K) devices receive the same master clock oscillator input,
then they will sample simultaneously. You can check the bus mode timing diagram in the data sheet to verify the
following:

-each device shares the same McBSP signals; i.e.
only one McBSP port is used

-each device should have its own "time slot" on
the McBSP interface. Specifically, this means
a) that in bus mode each device knows which
position it has, maybe using pull-up or pull-down
Rs on a couple of pins, and b) that each device
should have a time period when its serial output
(Tx) line (Rx for the DSP) is in tri-state or
high impedance, so it won't conflict with the
other devices

If so, then it's probably going to work the way you want. But, as Brian mentioned, to be sure you should ask TI guys
on E2E forum.

-Jeff
>If so, then it's probably going to work the way you want.
>But, as Brian mentioned, to be sure you should ask TI guys
>on E2E forum.
>-Jeff

Thanks for introducing this forum to me, I will try it as soon as possible.

--
Seyed Mehdi Hosseini
On Sep 24, 2009, at 12:06, Jeff Brower wrote:
> I would guess that as long as all three (3) AIC12 (or AIC12K)
> devices receive the same master clock oscillator input, then they
> will sample simultaneously.
The problem is phase. The master clock runs at a much higher rate
than the sample clock, and thus there are many different points at
which the chip can sample even if it shares a master clock. Many
serial ADC chips start the acquisition of a sample on a specific
event, such as the 4th bit of the serial command word, or on the
falling edge of the chip select signal. In either of those cases,
which correspond to chips I have designed with, the sample time for
each chip will be different because the communication timing is
different.

In this particular case, with one serial port sharing two or three
ADC chips, it's most likely that they will NOT sample simultaneously
unless you design very elaborate circuitry. The DSP will read one
chip at a time, and as a result only one chip will be sampling at a
time, and thus none of them will sample simultaneously.

Note: One thing I forgot to point out earlier is that a microphone-
based system probably will not be susceptible to sample phase issues,
because the time delays due to the distance between the mic and the
sound source will vary and will far outweigh the sample latency. In
other words, this is most likely a non-issue. In fact, that may
explain why the data sheets do not even mention the timing of the
sample process.

Brian Willoughby
Sound Consulting
Brian-

> On Sep 24, 2009, at 12:06, Jeff Brower wrote:
>> I would guess that as long as all three (3) AIC12 (or AIC12K)
>> devices receive the same master clock oscillator input, then they
>> will sample simultaneously.
> The problem is phase. The master clock runs at a much higher rate
> than the sample clock, and thus there are many different points at
> which the chip can sample even if it shares a master clock. Many
> serial ADC chips start the acquisition of a sample on a specific
> event, such as the 4th bit of the serial command word, or on the
> falling edge of the chip select signal. In either of those cases,
> which correspond to chips I have designed with, the sample time for
> each chip will be different because the communication timing is
> different.
>
> In this particular case, with one serial port sharing two or three
> ADC chips, it's most likely that they will NOT sample simultaneously
> unless you design very elaborate circuitry. The DSP will read one
> chip at a time, and as a result only one chip will be sampling at a
> time, and thus none of them will sample simultaneously.

These are good points. Unless the chip data sheet specifically talks about simultaneous sampling performed by
multiple devices then sampling phase alignment is likely to be an issue. And if the data sheet doesn't talk about
attaching multiple devices to the same serial port bus or "TDM bus", then it's not going to work anyway. The device
must specifically support a "multichannel" or "chain" mode of some type.

-Jeff

> Note: One thing I forgot to point out earlier is that a microphone-
> based system probably will not be susceptible to sample phase issues,
> because the time delays due to the distance between the mic and the
> sound source will vary and will far outweigh the sample latency. In
> other words, this is most likely a non-issue. In fact, that may
> explain why the data sheets do not even mention the timing of the
> sample process.
>
> Brian Willoughby
> Sound Consulting
Hi friends

> Note: One thing I forgot to point out earlier is that a microphone-
> based system probably will not be susceptible to sample phase issues,
> because the time delays due to the distance between the mic and the
> sound source will vary and will far outweigh the sample latency. In
> other words, this is most likely a non-issue. In fact, that may
> explain why the data sheets do not even mention the timing of the
> sample process.
>
> Brian Willoughby

You are right, but the sample phase issues is so important for me because I want to obtain time delay of arrival (TDOA) between 2 microphones.

>These are good points. Unless the chip data sheet specifically talks about
>simultaneous sampling performed by multiple devices then sampling phase >alignment is likely to be an issue.
>And if the data sheet doesn't talk about attaching multiple devices to >the same serial port bus or "TDM bus", then it's not going to work >anyway. The device must specifically support a "multichannel" or "chain" >mode of some type.

>-Jeff

Thanks Jeff, but I don't understand your good points! You mean that attaching multiple devices to the same serial port we can get simultaneous samples? If so, How?

Regards
Mehdi Hosseini