Creative SB0350 Hardware Programming Guide - Page 50
Creative SB0350 Manual
View all Creative SB0350 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 50 highlights
Digitized Sound I/O Programming 3-21 8-bit Stereo High-speed Single-cycle Transfer The following are the steps needed to perform 8-bit stereo PCM high-speed singlecycle DMA mode transfer: 1. 2. 3. Set up the DSP interrupt service routine. Enable the interrupt used. Turn on the DAC speaker for digitized output. Otherwise, turn it off. to turn off the DAC speaker outp(wSBCBaseAddx+0xC, 0xD3) to turn on the DAC speaker outp(wSBCBaseAddx+0xC, 0xD1) Set the hardware to stereo mode. a. For stereo input: outp(wSBCBaseAddx+0xC, 0xA8) 4. b. For stereo output: i. Set stereo mode. outp(wSBCBaseAddx+0x4, 0xE) bTmp = inp(wSBCBaseAddx+0x5) outp(wSBCBaseAddx+0x5, (bTmp | 0x2)) ii. Program the DMA controller for one byte single-cycle output. iii. Program the DSP to output one silent byte (value 0x80). outp(wSBCBaseAddx+0xC, 0x14) outp(wSBCBaseAddx+0xC, 0) outp(wSBCBaseAddx+0xC, 0) iv Upon receiving a DSP interrupt, acknowledge the DSP then exit the ISR. 5. 6. Program the DMA controller for 8-bit single-cycle DMA mode transfer. Set the DSP transfer Time Constant. outp(wSBCBaseAddx+0xC, 0x40) outp(wSBCBaseAddx+0xC, bTimeConstant) 7. Preserve the current input and output filter status, then turn it off. a. For stereo input: outp(wSBCBaseAddx+0x4, 0xC) bInputFilter = inp(wSBCBaseAddx+0x5) outp(wSBCBaseAddx+0x5, (bInputFilter | 0x20)) b. For stereo output: outp(wSBCBaseAddx+0x4, 0xE) bOutputFilter = inp(wSBCBaseAddx+0x5) outp(wSBCBaseAddx+0x5, (bOutputFilter | 0x20))