Zybo Beat Maker Project with Audio Driver
Post date: Nov 26, 2015 8:2:57 PM
Game Sound Project. I’ve decided to instead use the Zybo board, just so I can start developing over different hardware. Thus, this latest project focuses on the SSM 2603 audio codec for playing the game’s sound effects. I’ve recently discovered Digilent provides a bunch of example hardware descriptions and drivers, including those which drive the VGA and the audio codec’s I2S interface. However, in order to practice reading and implementing the details found in datasheets, I decided not to rely on the sources already provided in Digilent’s example. Admittedly, I did glance over their software driver after scratching my head over as to why my I2S module wasn’t pushing any sound through the SSM 2603. As it turns out, I needed to configure the audio codec’s registers through its I2C interface; by default, the DAC and output of the audio codec is disabled, and must be enabled through its I2C interface.
Video demonstration of the project.
Barring the implementation of the I2S module and its software driver, the rest of the project was trivial. As demonstrated in the video, four audio loops of the same tonal key are interpolated with a Python script to have the required 48 kHz sample rate, which had been hard coded into the I2S module. The raw samples of the audio loops are stored in main memory on the Zybo. The slide switches triggers interrupts that cause the corresponding samples to be copied into a memory buffer accessible to the I2S module.
Code. I’m not going to dive into any more details for this post. Those though who want to know more, though, please check out the source code I uploaded onto my GitHub.