<< Chapter < Page Chapter >> Page >
Goes over the implementation of our project.

Overall design

Layout of our design

This is an image of our actual implementation of this project. As you can see, the BeagleBone Black on the left is not attached to any supporting computer. We have the data stored directly on the board, and have 5 volts coming in to power it from a power outlet. This power lets the BeagleBone Black perform to the best of its capabilities when generating its bit stream. So 8 bits of digital output streams leave the general purpose I/O and enter the R/2R ladder. The system takes in these 8 digital outputs and generates a voltage that is the weighted sum of each bit. The signal continues through the design, and into the RC low pass filter where the high frequency copies are filtered out. Finally, the signal goes through the audio jack, into speakers, where it gets amplified and played as sound. Also not that we incorporated input buttons into our design for an educational, live demonstration of the process.

Full digital signal

In order to construct the full digital signal that is outputted by the BeagleBone Black, first we had to store the original digital data. We took audio files, turned them into a RAW format where they are unsigned bits so that they are easily handled. The BeagleBone Black outputs 8 new bits 44,100 times per second. These 8 output bits are changed to a 0 or a 1 based upon which audio file we read. As covered earlier, this yields 256 total voltage levels of output.

The program we wrote outputs the digital realization of several types of functions as well as 8 bit unsigned audio files to select pins on the BeagleBone Black. It is controlled by polling 5 input pins connected to tactile switches that cycle function, frequency (if applicable) and play/stop. This program relies on the Beagle Bone Black GPIO library.

First in our code, we want to establish pins, functions and songs.

Definitions

#define PI 3.14159265 #define PORT 8#define PORT2 9 //output pins#define PIN0 19 //least significant bit #define PIN1 17#define PIN2 16 #define PIN3 15#define PIN4 14 #define PIN5 13#define PIN6 12 #define PIN7 11 //most significant bit//input pins #define PIN8 15 //play/stop button pin#define PIN9 12 //increase frequency pin #define PIN10 11 //decrease frequency pin#define PIN11 14 //next function pin #define PIN12 13 //last function pin#define NUMFUNCTIONS 5 //used to check if function increment should roll over #define SONG0 "Beethoven5.raw" //define the audio file names#define SONG1 "TomSawyer.raw" #define SONG2 "HarderBetterFaster.raw"

Now, we want to establish core functions for both the conversion process and the live educational demonstration.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, R/2r implementation of a d/a converter. OpenStax CNX. Dec 17, 2014 Download for free at http://legacy.cnx.org/content/col11732/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'R/2r implementation of a d/a converter' conversation and receive update notifications?

Ask