User`s guide
Table Of Contents
- Getting Started
- Using the IQmath Library
- Block Reference
- Blocks — Alphabetical List
- Absolute IQN
- Arctangent IQN
- C24x ADC
- C24x CAN Receive
- C24x CAN Transmit
- C24x From Memory
- C24x PWM
- C24x To Memory
- C28x ADC
- C28x eCAN Receive
- C28x eCAN Transmit
- C28x From Memory
- C28x PWM
- C28x To Memory
- Division IQN
- F2812 eZdsp
- Float to IQN
- Fractional part IQN
- Fractional part IQN x int32
- Integer part IQN
- Integer part IQN x int32
- IQN to Float
- IQN x int32
- IQN x IQN
- IQN1 to IQN2
- IQN1 x IQN2
- LF2407 eZdsp
- Magnitude IQN
- Saturate IQN
- Square Root IQN
- Trig Fcn IQN
- Index

1 Getting Started
1-14
Using the c2000lib Blockset
This section uses an example to demonstrate how to create a Simulink model
that uses the Embedded Target for TI C2000 DSP blocks to target your board.
The example creates a model that performs PWM duty cycle control via pulse
width change. It uses the C2812 ADC block to sample an analog voltage and
the C2812 PWM block to generate a pulse waveform. The analog voltage
controls the duty cycle of the PWM and you can observe the duty cycle change
on the oscilloscope. This model is also provided in the Demos library. Note that
the model in the Demos library also includes a model simulation.
Hardware Setup
The following hardware is needed for this example:
• Spectrum Digital eZdsp F2812
• Function generator
• Oscilloscope and probes
Connect the hardware as follows:
1 Connect the function generator output to the ADC input ADCINA0 on the
eZdsp F2812.
2 Connect the output of PWM1 on the eZdsp F2812 to the analog input of the
oscilloscope.
Starting the c2000lib Library
At the MATLAB prompt, type
c2000lib
to open the c2000lib library blockset, which contains libraries of blocks
designed for targeting your board.