We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X
Maximize Your Experience: Reap the Personalized Advantages by Completing Your Profile to Its Fullest! Update Here
Stay in the loop with the latest from Microchip! Update your profile while you are at it. Update Here
Complete your profile to access more resources.Update Here!

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.

Sample Rate Conversion (SRC) Library


Title
Date
Sample Rate Conversion Library for dsPIC User’s Guide 27 Oct 2014 Download
Sample Rate Conversion Library for PIC32 User’s Guide 27 Oct 2014 Download
SRC Library for dsPIC33E_092111 27 Oct 2014 Download
PIC32_Audio_24b_SRC_library_020713 27 Oct 2014 Download
PIC32_Audio_16bSRC__Library_092111 27 Oct 2014 Download