Digitized Sound I/O Programming
3-17
8-bit Mono High-Speed Single-cycle Transfer
The following are the steps needed to perform 8-bit mono PCM high-speed single-
cycle DMA mode transfer:
1.
Set up the DSP interrupt service routine.
2.
Enable the interrupt used.
3.
Turn on the DAC speaker for digitized output. Otherwise, turn it off.
outp(wSBCB0xC, 0xD3)
to turn off the DAC speaker
outp(wSBCB0xC, 0xD1)
to turn on the DAC speaker
4.
Program the DMA controller for 8-bit single-cycle DMA mode transfer.
5.
Set the DSP transfer Time Constant.
outp(wSBCB0xC, 0x40)
outp(wSBCB0xC, bTimeConstant)
6.
Set the DSP transfer block size.
outp(wSBCB0xC, 0x48)
outp(wSBCB0xC, wBlkSize.LowByte)
outp(wSBCB0xC, wBlkSize.HighByte)
wBlkSize
is one byte less than the actual data transfer size.
7.
Send an I/O command to start high-speed single-cycle DMA mode
transfer.
outp(wSBCB0xC, bCommand)
bCommand
is one of the following:
bCommand
Description
99h
8-bit PCM high-speed input
91h
8-bit PCM high-speed output
When the DSP sends an interrupt, the following steps should be done in the interrupt
service routine:
1.
Program the DMA controller for the next block.
2.
Set the DSP block size and program the DSP for the next block.