Sigma Studio Basic Uc Integration Tutorial
Sigma Studio Basic Uc Integration Tutorial
Basic Microcontroller
Integration Using Sigma Studio
Wilfrido Sierra
November 2010
Overview
This document will describe how to program a
microcontroller to emulate SigmaStudio to communicate with
a SigmaDSP IC in a real production system.
SigmaStudio already displays helpful information in the
Capture Window, which is shown below.
Displays all data written over the USB communications link
Parameter/register name, value, hex data, number of bytes
Data can easily be exported to a file
2
Sigma Studio Overview
3
Sigma Studio Overview (cont…)
This compiles the project code and generates all necessary data files
to run the project on the SigmaDSP)
If an evaluation board is attached to the computer, the capture window
will display all data written from the computer to the SigmaDSP over
the USB port.
After compilation, the “Export System Files” button will be enabled
4
Sigma Studio Overview (cont…)
5
Sigma Studio Overview (cont…)
6
Sigma Studio Overview (cont…)
7
Sigma Studio Overview (cont…)
8
Sigma Studio Overview (cont…)
9
Sigma Studio Overview (cont…)
10
Microcontroller Implementation
Now that the files have successfully been exported from
SigmaStudio, microcontroller code can be developed.
This example uses the ARM Cortex M3 series and Keil
integrated development environment.
The user should define the basic microcontroller
configuration such System Clocks, NVIC, GPIO, and the
communication protocol configurations (in our case I2C)
before continuing with this tutorial.
11
Microcontroller Implementation
First, open the “main.c” file.
In this file, the following header files must be included:
SigmaStudioFW.h (Assuming that the macros have been already
defined by the user)
*_IC_1.h
*_IC_1_PARAM.h
12
Microcontroller implementation
The “main” function should look something like this:
13
Microcontroller implementation (cont…)
14
Microcontroller implementation (cont…)
15
Microcontroller implementation (cont…)
16
Microcontroller implementation (cont…)
17
Using the Sequencer Window
18
Using the Sequencer Window (cont…)
19
Using the Sequencer Window (cont…)
20
Using the Sequencer Window (cont…)
Now, its time to create modes using the data capture window.
A “mode” is a set of register and RAM writes that change
something about the signal flow or device configuration
Clicking at the first radio button on our Nx2-1 control will display
the corresponding write sequence in the Capture window
21
Using the Sequencer Window (cont…)
Now, its time to create modes using the data capture window.
Drag and drop the information displayed on the data capture
window to the sequencer window. This creates a single write
command in our “Tones” mode.
Multiple lines can be selected in the capcture window using shift-
click or control-click
Clear
the data capture window again by clicking the red X in the its
upper left corner. Now, select the next routing path from the Nx2-1
control.
22
Using the Sequencer Window (cont…)
Now, its time to create modes using the data capture window.
Createanother mode by right clicking under the “Tones” button.
Select “Add Mode” and rename it to “Music”
Drag and drop the information from the data capture window into
the sequencer window.
Repeat these steps for the last option on the multiplexer and
create a mode named “White Noise”.
23
Using the Sequencer Window (cont…)
Save
the sequencer file on a folder by pressing the “Save
Sequence File” button.
24
Using the Sequencer Window (cont…)
You must save the sequence file (click the blue disk icon) before the
Sequencer Window can be used
25
Exporting Sequences to a microcontroller
27
Accessing Sequencer Modes
28
For reference
See the example files that were created for an ADAU1761 and
an ARM Cortex M3
ADAU1761_Demo.zip
30