English
Language : 

CS4226 Datasheet, PDF (45/60 Pages) Cirrus Logic – Surround Sound Codec
CDB4226
SPI CONTROL PORT SOFTWARE
The SPI/I2C port can be accessed through the DB-
25 connector, PC CONN. Software is provided
which allows reading and writing of the CS4226
control port registers with a PC using the SPI for-
mat. The supplied cable should be attached be-
tween PC CONN and the PC parallel port.
Software Description
Four C programs have been compiled to operate
under MS-DOS. These programs can be run direct-
ly from the floppy disk provided. A brief descrip-
tion of the supplied routines is given. To see a full
argument list for each routine, simply type the
command with no arguments.
RSTSPI
Send a brief reset to the board. This is the same as
depressing the /PDN switch.
RDSPI <map>
This routine returns the value located in the register
pointed to by <map>. The <map> value is in hex
and the value returned is in hex.
WRSPI <map> <data>
This routine writes the <data> into the register
pointed to by <map>. Both values are in hex.
DUMPSPI <map>
This routine dumps the value of all the registers
starting at <map> up to register 25.
RDPSI, WRSPI, and DUMPSPI have an optional
argument "-pXX", defined in Table 5. This argu-
ment is used to set the direction of the bidirectional
transceivers, U23 (Figure 8) and U16 (Figure 9).
The "-pXX" argument must be sent at least once
after powerup to configure the evaluation board to
recognize whether the AUX port and DSP port are
in master mode (clock lines are outputs) or in slave
mode (clock lines are inputs). The "-pXX" argu-
ment should be set with consideration of setting the
DMS bits in the DSP Port Mode Byte and the AMS
bits in the Auxiliary Port Mode Byte.
Optional Argument
-p00
-p08
-p10
-p18
-e <hex>
Description
CS4226 AUX port is master, DSP port is master (User must set AMS=2, DMS=2)
CS4226 AUX port is master, DSP port is slave (User must set AMS=2, DMS=0)
CS4226 AUX port is slave, DSP port is master (User must set AMS=0, DMS=2)
CS4226 AUX port is slave, DSP port is slave (User must set AMS=0, DMS=0)
<hex> specifies an ending register on DUMPSPI
Table 5. Optional Software Switch Statements for RDSPI, WRSPI, and DUMPSPI commands
DS188DB1
45