Microchip Technology Inc

Sample Rate Conversion (SRC) Library


Summary
The Sample Rate Conversion (SRC) library, which can be used with Microchip’s PIC32 and dsPIC family of devices, provides the ability to convert the sampling rate of real-time stereo audio data to select common high-quality audio sample rates. It is designed for streaming audio applications and can be used with analog front ends like audio DACs or CODECs with limited sample rate capability. The library supports both 16-bit and 24-bit input data resolution for PIC32 devices and supports 16-bit input data resolution for dsPIC devices.

The 16-bit and 24-bit library supports the following modes:
• Up conversion from sample rate of 44.1 kHz to 48 kHz
• Up conversion from sample rate of 32 kHz to 48 kHz

In addition, the 24-bit library supports the following mode as well:
• Down conversion from sample rate of 48 kHz to 44.1 kHz

The SRC library is available at the bottom of the page as installers for PIC32 or dsPIC along with the relevant user’s guide.

Description
The incoming audio data passes through an upsampler/ interpolation stage. The signal then passes through an anti-aliasing low-pass filter followed by a downsampler or decimation stage. The algorithm is optimized for MIPS by using the polyphase filtering algorithm. The figure below shows the various blocks of the SRC algorithm.

Features
• Stereo 16-bit or 24-bit audio sample rate conversion
• Common audio modes:
- 32 KHz to 48 KHz sample rate conversion
- 44.1 KHz to 48 KHz sample rate conversion
- 48 KHz to 44.1 KHz sample rate conversion
• Low MIPS and resource requirement
• Can be used with low-cost DAC with limited sample rate capability
• Designed for streaming audio applications for real-time conversion
• Free!

Resource Usage
PIC32 16-BIT SRC LIBRARY

SRC Library

    SRC Mode

    MIPS

Code Size (bytes)

Data Size (bytes)

    Lite Version

32KHz to 48KHz

    27

    5684

    1284

44.1KHz to 48KHz

    30

    Full Version

32KHz to 48KHz

    34

    5760

    1364

44.1KHz to 48KHz

    37

PIC32 24-BIT SRC LIBRARY

SRC Library

SRC Mode

MIPS

Code Size (bytes)

Data Size (bytes)

Lite Version

32KHz to 48KHz

53

2608

3328

44.1KHz to 48KHz

61

5984

6612

48KHz to 44.1KHz

57

5916

6976

dsPIC 16-BIT SRC LIBRARY

SRC Library

    SRC Mode

    MIPS

Code Size (bytes)

Data Size (bytes)

    Lite Version

32KHz to 48KHz

    6.1

7624

2744

44.1KHz to 48KHz

    9.1

    Full Version

32KHz to 48KHz

    7.2

7704

2866

44.1KHz to 48KHz

    10.1

Note: Please refer to the user’s guide for more information.

Downloads

Description
Download
KB Size
Updated as of
70668B
166
10/27/2014
61190A
198
10/27/2014
SRC Library for dsPIC33E_092111
5519
10/27/2014
PIC32_Audio_24b_SRC_library_020713
19501
10/27/2014
PIC32_Audio_16bSRC__Library_092111
5421
10/27/2014