<< Chapter < Page Chapter >> Page >

For each frame the counter correspondent to the loudest channel is incremented. When a channel counter equals a threshold The requirement for a threshold amount of wining rounds was set in order to prevent random noise or occasional “spikes” from interfering with the algorithms function. This threshold is configurable. In this example it was set to 10. , the correspondent channel is selected.

For Each 64 samples frame the following algorithm is implemented:

    Output channel selection procedure

  1. Find Maximum Input Level
  2. Increment Counter correspondent to the “loudest” channel
  3. If the Counter value =10 THEN:
  4. Broadcast correspondent input channel to all outputs
  5. Reset Counter

This section will describe the process of generating a real-time application using Simulink blocks for the algorithm itself and the driver introduced in the previous chapter. The Simulink model is shown in Figure 21 The algorithm is implemented for 4 channels, however we will use only three of them. .

Simulink Model

The block diagram shown in Figure 20 is translated to the model shown in the following figures.

  • The conference algorithm routes a selected channel to the 4 outputs:
Signal Routing
  • The input level is measured for 4 channels:
Algorithm Model
  • The 4 level values compose a 4 element vector. This vector is fed to the “Max abs value” block:
Finding the Maximum Level
  • The index of the Maximum level enters the index selection block. The correspondent channel is incremented and compared to the threshold.
Index Selection
  • If the counter value equals the threshold, the index is selected as input to the conference block

The real-time model can be found in the file C67_Simulink_conference.rar.

References

  1. "TLV320AIC20K/24KEVM User's Guide ", TI Document SLAU088A, April 2005 ( (External Link) )
  2. "DSP−CODEC Development Platform User's Guide", TI Document SLAU090, September 2002 ( (External Link) )
  3. "Low Power Highly-Integrated Programmable 16-Bit 26-KSPS Dual Channel CODEC (Rev. D)" TI Document SLAS363D, March 2002 –Revised April 2005 ( (External Link) )

MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

Appendix a – configuration

Tlv320aic24k&Codec development platform

Analog ports

The following table is based on the one the Codec’s EVM Datasheet.

It matches the board connectors with the inputs and outputs.

(Notice, this table includes corrections and elaborations in compare to the one in the Datasheet).

  • We are using the TLV320AIC24KEVM is 24K.

The Inputs and Outputs of a certain channel are set by its 6a and 6b registers.

Those registers can be set, like before, between the initialization of the Handle and its activation.

If, for example, the input samples of channel 0 in the CODEC should be received from INP3 According to the table the connection is to J10, since we are working with 24K EVM and channel 0 is located at the master side.) . The configuration should be as follows:

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, From matlab and simulink to real-time with ti dsp's. OpenStax CNX. Jun 08, 2009 Download for free at http://cnx.org/content/col10713/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'From matlab and simulink to real-time with ti dsp's' conversation and receive update notifications?

Ask