<< Chapter < Page
  From matlab and simulink to real     Page 2 / 3
Chapter >> Page >

Starting code composer studio

Start Code Composer Studio for C6713 DSK and use Debug ->Connect.

Startup Screen for Code Composer Studio (CCS)

Opening an existing model

Start MATLAB 7.3.0 R2006b:

Opening an Existing Demo

Click on “Demos”. The following screen will appear:

Selecting the Audio Demo Models

Highlight “Embedded Target for TI C6000 DSP” then “Audio”. Click on “Wavelet Denoising”.

Viewing the wavelet denoising parent

The “Wavelet Denoising” model is now displayed. Double-click on the “function()” box.

Wavelet Denoising Parent

The original wavelet noise reduction algorithm

The “Wavelet Noise Reduction Algorithm” model is now displayed.

Wavelet Denoising Algorithm

Copying the model

For convenience, copy the model to the MATLAB “Work” directory where most models are stored.

Copying the Model to the MATLAB “Work” directory

Overview of the modified model

In order to run the model on the C6713 DSK and be able to compare the performance with and without noise reduction, we will make some small modifications to the demo model.

The Modified Algorithm

You will now update the existing model by dragging-and-dropping some library components onto the model.

Changing the input to microphone

Double-click on the blue box to the left marked “C6713 DSK ADC”. The following options will appear.

Setting up the ADC for Microphone Input

Change the “ADC source” to “Mic In” and tick the “Stereo” box. If you have a quiet microphone, tick the “+20dB Mic gain boost” box. When done, click on “OK”.

The dac settings

The DAC settings need to match those of the ADC. Check that they are the same.

Setting the DAC Parameters

Adding a dip switch and led

To change between no wavelet denoising and with wavelet noise reduction, we will use a DIP switch of the C6713 DSK.

Adding a Switch and LED

Select View ->Library Browser ->Embedded Target for TI C6000 DSP. Highlight “C6713 DSK Board Support”.

Drag-and-drop the “Switch” block onto the model. Also drag-and-drop the “LED” block onto the model.

Dip switch settings

The DIP switch needs to be configured. Double-click on the “Switch” block.

Put at tick in all of the boxes and set “Data type” to Integer. The “Sample time” should also be set to “–1”.

Setting up the DIP Switch Value

Adding a constant, switch and relational operator

We now need to setup a way to switch between straight through without noise reduction and with wavelet noise reduction.

Select View ->Library Browser ->Simulink. Highlight “Commonly Used Blocks”.

Drag-and-drop a “Constant” onto the model.

Drag-and-drop a “Switch” block onto the model.

Drag-and-drop a “Relational Operator” block onto the model.

Selecting the Commonly Used Blocks

Setting the constant value

The switch values lie between 0 and 15. We will use switch values 0 and 1. Double-click on the “Constant” block. Set the “Constant value” to 1 and the “Sample time” to “inf”.

Setting the Echo Delay Gain

Setting the constant data type

Click on the “Signal Data Types” tab. Set the “Output data type mode” to “int16”. This is compatible with the DAC on the C6713 DSK. Click on “OK”.

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