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
|
|
|
Code Size (bytes)
|
Data Size (bytes)
|
|
32KHz to 48KHz
|
|
|
|
44.1KHz to 48KHz
|
|
|
32KHz to 48KHz
|
|
|
|
44.1KHz to 48KHz
|
|
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
|
|
|
Code Size (bytes)
|
Data Size (bytes)
|
|
32KHz to 48KHz
|
|
7624
|
2744
|
44.1KHz to 48KHz
|
|
|
32KHz to 48KHz
|
|
7704
|
2866
|
44.1KHz to 48KHz
|
|
Note: Please refer to the user’s guide for more information.