BittWare Audio-PMC+ Analog Input

Audio-PMC+ Analog Input block (not recommended)


Simulink® Real-Time™ Library of Drivers No Longer Recommended for Use

Block Parameters

Channel Vector

This is a vector of channels. Specifies the input channels that the block works on. For example, to use the first, third, and fifth analog input channels, enter

Output Format

Specify the format that the data takes. The choices are

  • A normalized double in the range from -1.0 to 1.0

  • An unscaled integer

    The unscaled integer format is usable with blocks that can accept fixed point data. This format contains the data in the lower 24 bits of a 32 bit integer with sign extension in the upper 8 bits.

    Note:   You can only set this parameter for the analog input block. The analog output block determines the data type from the connection and sets itself to the required type.

Frame Size, Sample Rate, and Sampletime

These three parameters are not independent but are related by

FrameSize = Sampletime * SampleRate.

After you specify two of the parameters, the equation determines the third parameter.

For example, if you set Frame Size to 32 and Sample Rate to 40000, specify Sampletime as -1. It is computed internally to 0.0008 seconds. This example model will execute every 0.0008 seconds, which is every 32 samples at 40 kHz.

Conversely, you can also specify that you want to execute every 1.0 ms with a Frame Size of 64 samples. Specify Sample Rate as -1. It is computed to be 64000 Hz.

The implementation of Sample Rate on the Audio-PMC+ might cause the rate on your board to be inexact. Audio-PMC+ derives the sample rate from the PWM0 output of the first 21065L SHARC® DSP chip. The PWM0 output is driven by the 60 MHz CPU clock for sample rates between 100 kHz and 20 kHz and by a prescaled 30 MHz CPU clock (half the 60 MHz CPU clock) for sample rates between 8 kHz and 20 kHz.

The sample rate is implemented internally by specifying the total number of counts per sample interval. For example, the number of counts for a sample rate of 44.1 kHz is calculated as


This value is rounded down to 1360. To calculate the actual clock sample rate, divide 60 MHz by the number of counts


The result indicates that the sample rate is off by 0.04%. This calculation assumes that the CPU clock is exactly 60 MHz.

Since you can build a model with just input or just output, the three rate parameters are included in both block parameter dialogs. You must set them to equal values if you have a model that has both. If they are not equal, you will get an error when you try to build the model.

The practical limit on Sample Rate is


Below 8 kHz, the output digital filter does not seem to work, although the converter continues to work there.

Frame Size values can be between 1 and 256. If the specified or computed frame size exceeds 256, the driver will return an error during initialization.

PCI slot (-1:autosearch)

If only one board of this type is in the target computer, enter -1 to locate the board.

If two or more boards of this type are in the target computer, enter the bus number and the PCI slot number of the board associated with this driver block. Use the format [BusNumber,SlotNumber].

To determine the bus number and the PCI slot number, type:

tg = slrt;
getPCIInfo(tg, 'installed')

    Note:   The use of multiple boards, at the same time and in the same model, is unsupported.

Was this topic helpful?