Creative SB0350 Hardware Programming Guide - Page 24

Creative SB0350 Manual

Page 24 highlights

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 Read Data Write Command/Data Write-Buffer Status Read-Buffer Status 2x6h (write only) 2xAh (read only) 2xCh (write) 2xCh (read) 2xEh (read only) Used to reset the DSP to its default state. Used to access in-bound DSP data. Used to send commands or data to the DSP. Also indicates whether the DSP is ready to accept commands or data. 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. 2. 3. Write a "1" to the Reset port (2x6h) and wait for 3 microseconds. Write a "0" to the Reset port. 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

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141

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
2
x
6h
(write only)
Used to reset the DSP to its default state.
Read Data
2
x
Ah
(read only)
Used to access in-bound DSP data.
Write
Command/Data
Write-Buffer
Status
2
x
Ch
(write)
2
x
Ch
(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
2
x
Eh
(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 (2
x
6h) 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