2-2
Introduction to DSP Programming
DSP I/O Addresses
The DSP is programmed through four selectable I/O addresses on the Sound Blaster
cards. The following lists the I/O addresses and their functionalities. x represents
the jumper selectable base I/O addresses.
Reset
2x6h
(write only)
Used to reset the DSP to its default state.
Read Data
2xAh
(read only)
Used to access in-bound DSP data.
Write
Command/Data
Write-Buffer
Status
2xCh
(write)
2xCh
(read)
Used to send commands or data to the
DSP.
Also indicates whether the DSP is ready
to accept commands or data.
Read-Buffer
Status
2xEh
(read only)
Indicates whether there is any in-bound
data available for reading.
Table 2-1: DSP I/O Ports
Resetting DSP
The DSP has to be reset before it is first programmed. The reset causes it to perform
an initialization and returns it to its default state. The DSP reset is done through the
Reset port.
After the initialization, the DSP returns a data byte 0AAh at the Read Data port. The
procedure to reset the DSP is as follows:
1.
Write a "1" to the Reset port (2x6h) and wait for 3 microseconds.
2.
Write a "0" to the Reset port.
3.
Poll for a ready byte 0AAh from the Read Data port. You must check the
Read-Buffer Status port to ensure there is data before reading the Read
Data port.
Typically, the DSP takes about 100 microseconds to initialize itself. After this
period of time, if the return value is not 0AAh or there is no data at all, then the