Introduction
The Propeller 2 Multicore Microcontroller is able to generate high-quality sound and video while simultaneously interfacing with human input devices and sensors, which makes it a very cost-effective, supply-chain-efficient replacement for multiple ICs used in existing products. This Quick Byte demonstrates the ADC to DAC and Analog to DAC capability of the Propeller 2 with the P2 HD Audio Add-on Set hardware. Source code files for both of these examples are available for download below.
Digital Sample ADC to DAC Example
The demo code uses both the ADC and DAC boards from the P2 HD Audio Set. Sound is sampled in at one of the ADC jack sockets, and replayed with optional delay effects at the DAC jack socket. This example shows how to configure the ADC board for a variety uses, and is setup by default to sample at 48kHz from the ADC line-in jack, add some delay, and then output with 31ohms drive strength (suitable for headphones) at the DAC output jack.
Analog Frequency to DAC Example
The example code shows the use of the DAC in a simple configuration, outputting sounds generated by the P2 as musical notes to play a popular tune! The intention of this demo was to show that the DAC could be used on its own to drive line-level or headphone devices directly from the Parallax P2 Microcontroller SmartPins. This type of use would be common in game consoles and many other interactive, industrial and educational applications.
Additional Resources
Document Author
- Ken Gracey
Source Code Author
- Chip Gracey
- Michael Mulholland