0% found this document useful (0 votes)
12 views94 pages

CS4235

Uploaded by

Greg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
12 views94 pages

CS4235

Uploaded by

Greg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 94

CS4235

Advanced Product Databook

FEATURES CrystalClear™
■ Compatible with Sound Blaster™, Sound Blaster
Pro™, and Windows Sound System™
Low Cost ISA Audio System
■ Advanced MPC3-Compliant Input and Output
Mixer
■ Enhanced Stereo Full Duplex Operation
DESCRIPTION
■ Dual Type-F DMA Support The CS4235 is a single chip multimedia audio system
that is pin-compatible to the CS423xB for many de-
■ Integrated CrystalClear™ 3D Stereo signs. The product includes an integrated FM
Enhancement synthesizer and a Plug-and-Play interface. In addition,
■ Industry Leading Delta-Sigma Data Converters the CS4235 includes hardware master volume control
(86 dB FS A) pins as well as extensive power management and 3D
■ Internal Default PnP Resources sound technology. The CS4235 is compatible with the
Microsoft® Windows Sound System standard and will
■ CS9236 Wavetable Interface run software written to the Sound Blaster and Sound
■ CS4610 Audio Accelerator Interface Blaster Pro interfaces. The CS4235 is fully compliant
■ CS4236B/CS4237B/CS4238B Register with Microsoft’s PC’97 and PC’98 audio requirements.
Compatible
ORDERING INFO
CS4235-JQ 100 pin TQFP, 14x14x1.4mm
CS4235-KQ 100 pin TQFP, 14x14x1.4mm

XTALI XTALO VREF

OSCILLATOR VREF

INPUT MIXER

SD<7:0>
ISA
BUS
INTERFACE
FIFO Stereo
ADC1 Σ GAIN L/RAUX1

SA<11:0>
IOR L/RAUX2
GAIN
PLUG CMAUX2
IOW
AND
AEN PLAY

CODEC
IOCHRDY GAIN MIC
REG
I/F
IRQ<A:G> FIFO Stereo
DAC1
DRQ<A:C> Config
IO
IRQ ATTN MIN
DACK<A:C>
DMA
OUTPUT MIXER

Σ
FM
Decode Synthesizer Stereo 3D
Logic ATTN L/ROUT
DAC2 Enhancement

MPU-401 UP
ANALOG CS9236 WSS Hardware
SA<12:15) CS4610 UART EEPROM DOWN
CD-ROM or JOYSTICK WAVETABLE SBPRO
(CDROM) INTERFACE with Interface Volume Control
Upper Address Bits LOGIC INTERFACE Registers
FIFOS MUTE

BRESET JOYSTICK SERIAL PORT SERIAL PORT MIDI SCL SDA

NOV ‘97 Copyright  Cirrus Logic, Inc. 1997 DS252PP2


(All Rights Reserved)
CRD4235-8
TM
CrystalClear 16-Bit Audio Motherboard Example Design

TABLE OF CONTENTS

CS4235 PERFORMANCE SPECIFICATIONS ... 3 WSS CODEC SOFTWARE DESCRIPTION .......67


GENERAL DESCRIPTION ................................. 12 Calibration ........................................................67
ISA Bus Interface............................................. 13 Changing Sampling Rate .................................68
PLUG AND PLAY ............................................... 15 Changing Audio Data Formats.........................69
PnP Data ......................................................... 16 Audio Data Formats .........................................69
Loading Resource Data................................... 16 DMA Registers .................................................69
Loading Firmware Patch Data......................... 18 WSS Codec Interrupt .......................................71
The Crystal Key ............................................... 18 Error Conditions ...............................................71
Bypassing Plug and Play................................. 19 DIGITAL HARDWARE DESCRIPTION...............72
Crystal Key 2 ................................................... 20 Bus Interface ....................................................72
Hardware Configuration Data .......................... 20 Volume Control Interface .................................72
Hostload Procedure ......................................... 24 Crystal/Clock ....................................................73
External E2PROM............................................ 25 General Purpose Output Pins ..........................73
WINDOWS SOUND SYSTEM CODEC .............. 26 Reset and Power Down ...................................73
Enhanced Functions (MODEs)........................ 27 Address Port Configuration ..............................73
FIFOs ............................................................... 27 Multiplexed Pin Configuration ..........................74
WSS Codec PIO Register Interface ................ 27 ANALOG HARDWARE DESCRIPTION .............74
DMA Interface.................................................. 28 Line-Level Inputs Plus MPC Mixer...................74
Sound System Codec Register Interface ........ 29 Microphone Level Input....................................75
Direct Mapped Registers (R0-R3) ............... 30 Mono Input .......................................................75
I/O Data Registers (R3)............................... 31 Line-Level Outputs ...........................................75
Indirect Mapped Registers (I0-I31) .............. 32 Miscellaneous Analog Signals .........................76
WSS Extended Registers (X0-X31) ............ 44 GROUNDING AND LAYOUT ..............................76
SOUND BLASTER INTERFACE........................ 53 POWER SUPPLIES.............................................76
Mode Switching ............................................... 53 ADC/DAC FILTER RESPONSE..........................78
Sound Blaster Direct Register Interface.......... 53 PIN DESCRIPTIONS ...........................................80
Sound Blaster Mixer Registers........................ 54 ISA Bus Interface Pins .....................................81
GAME PORT INTERFACE ................................. 55 Analog Inputs ...................................................82
CONTROL INTERFACE ..................................... 57 Analog Outputs.................................................83
Control Register Interface................................ 57 MIDI Interface...................................................84
Control Indirect Registers (C0-C9) .................. 59 External Peripheral Signals..............................84
MPU-401 INTERFACE ........................................ 62 Joystick Interface..............................................85
MPU-401 Register Interface ............................ 62 CS4610 DSP Serial Port Interface...................85
MIDI UART ...................................................... 63 CS9236 Wavetable Serial Port Interface .........85
MPU-401 "UART" Mode Operation ................. 63 CDROM Interface.............................................86
FM SYNTHESIZER ............................................. 63 Volume Control.................................................87
CDROM INTERFACE ......................................... 64 Miscellaneous...................................................87
CS4610 DSP SERIAL DATA PORT .................. 64 Power Supplies ................................................88
CS9236 WAVETABLE SERIAL DATA PORT ... 66 PARAMETER DEFINITIONS...............................89
PACKAGE PARAMETERS .................................90
APPENDIX A: DEFAULT PnP DATA.................91
APPENDIX B: CS4235 DIFFERENCES .............93

Windows 95 and Windows 3.1 are trademarks; Microsoft, Windows and Windows Sound System are registered
trademarks of Microsoft Corporation.
Sound Blaster and Sound Blaster Pro are trademarks of Creative Labs.
Ad Lib is a trademark of Adlib Corporation.
CrystalClear is a trademark of Cirrus Logic, Inc.

2 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

ANALOG CHARACTERISTICS (TA = 25 °C; VA, VD1, VDF1-VDF3 = +5 V;


Input Levels: Logic 0 = 0 V, Logic 1 = VD1; 1 kHz Input Sine wave; Sample Frequency, Fs = 44.1 kHz;
Measurement Bandwidth is 20 Hz to 20 kHz, 16-bit linear coding.)
CS4235-JQ CS4235-KQ
Parameter* Symbol Min Typ Max Min Typ Max Units

Analog Input Characteristics (A-D-PC) - Volume set to 0 dB unless otherwise specified.


ADC1 Resolution (Note 1) 16 - - 16 - - Bits
ADC1 Differential Nonlinearity (Note 1) - - ±0.5 - - ±0.5 LSB
Frequency Response: Ac = ±1 dB FR - - - 20 19000 Hz
Dynamic Range AUX1, AUX2 DR - -80 - -80 -85 - dB FS A
(Note 2) MIC - -75 - -72 -80 - dB FS A
Total Harmonic Distortion+Noise AUX1, AUX2 THD+N - -66 - -75 -80 - dB FS A
-3 dB FS input (Note 2) MIC - -66 - -72 -80 - dB FS A
Interchannel Isolation (Note 1): Left to Right - -80 - -70 -80 - dB
10 kHz input AUX1/2 to MIC - -80 - - -80 - dB
AUX1 to AUX2 - -80 - - -90 - dB
Interchannel Gain Mismatch AUX1, AUX2 - - ±0.5 - - ±0.5 dB
MIC - - ±0.5 - - ±0.5 dB
ADC1 Offset Error 0 dB Gain - - - - ±10 ±200 LSB
Full Scale Input Voltage:
(MGE/MBST=1) MIC 0.25 0.28 - 0.25 0.28 - Vpp
(MGE/MBST=0) MIC 2.5 2.8 - 2.5 2.8 - Vpp
AUX1, AUX2, MIN 2.5 2.8 - 2.5 2.8 - Vpp
Gain Drift - ±100 - - ±100 - ppm/°C
Input Resistance (Note 1): MIC 8 11 - 8 11 - kΩ
AUX1, AUX2, MIN 20 23 - 20 23 - kΩ
Input Capacitance (Note 1) - - 15 - - 15 pF
Notes: 1. This specification is guaranteed by characterization, no production testing.
2. MGE or MBST = 1 (see WSS Indirect Reg I0 or X2).

*Parameter definitions are given at the end of this data sheet.

Specifications are subject to change without notice.

DS252PP2 3
CS4235
TM
CrystalClear Low Cost ISA Audio System

ANALOG CHARACTERISTICS (Continued)

CS4235-JQ CS4235-KQ
Parameter* Symbol Min Typ Max Min Typ Max Units

Analog Output Characteristics (PC-D-A) - Volume set to 0 dB unless otherwise specified.


DAC1 Resolution (Note 1) 16 - - 16 - - Bits
DAC1 Differential Nonlinearity (Note 1) - - ±0.5 - - ±0.5 LSB
DAC1 Frequency Response: Ac = ±1 dB FR - - - 20 - 19000 Hz
DAC1 Dynamic Range DR - -86 - -80 -86 - dB FS A
DAC1 Total Harmonic Distortion+Noise: THD+N - -80 - -74 -80 - dB FS A
-3 dB FS input (Note 3)
DAC1 Interchannel Isolation (Notes 1,3) - -95 - -80 -95 - dB
DAC1 Interchannel Gain Mismatch - ±0.1 ±0.5 - ±0.1 ±0.5 dB
Voltage Reference Output - VREF 2.0 2.2 2.5 2.0 2.2 2.5 V
Voltage Reference Output Current - VREF - 100 400 - 100 400 µA
(Notes 1,4)
DAC1 Programmable Attenuation Span 90 94.5 - 90 94.5 - dB
DAC1 Atten. Step Size: Greater than -82.5 dB 1.3 1.5 1.7 1.3 1.5 1.7 dB
-82.5 dB to -94.5 dB 1.0 1.5 2 1.0 1.5 2 dB
DAC1 Offset Voltage - - - - ±1 ±10 mV
Full Scale Output Voltage (Note 3) 2.5 2.8 3.3 2.5 2.8 3.3 Vpp
Gain Drift (Note 1) - 100 - - 100 - ppm/°C
Deviation from Linear Phase (Note 1) - - 1 - - 1 Degree
(Passband)
External Load Impedance (Note 1) 10 - - 10 - - kΩ
Mute Attenuation (Note 1) 80 - - 80 - - dB
Power Supply
Power Supply Current Digital, Operating - 70 - - 70 80 mA
Analog, Operating - 30 - - 30 35 mA
Total Operating - 100 - - 100 - mA
Total Power Down - - - - - 1 mA
Power Supply Rejection, 1 kHz (Note 1) 40 - - 40 - - dB
Notes: 3. 10 kΩ, 100 pF load.
4. DC current only. If dynamic loading exists, then the voltage reference output must be buffered
or the performance of ADCs and DACs will be degraded.

4 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

MIXERS (TA = 25 °C; VA, VD1, VDF1-VDF3 = +5 V; Input Levels: Logic 0 = 0 V, Logic 1 = VD1;
1 kHz Input Sine wave, Measurement Bandwidth is 20 Hz to 20 kHz.)

CS4235-JQ CS4235-KQ
Parameter* Symbol Min Typ Max Min Typ Max Units
Mixer Gain Range Span AUX1, AUX2 - - - 42 45 - dB
MIC - - 40 45 - dB
Hardware Master - - 75 86 - dB
DAC1, DAC2 - - 85 94.5 - dB
Step Size MIC, AUX1, AUX2 - - - 1.3 1.5 1.7 dB
Hardware Master - - - 1.6 2.0 2.4 dB
DAC1, DAC2 - - - 0.9 1.5 2.0 dB
Frequency Response: Ac = ±1 dB (Notes 1,3) FR - - - 20 - 20000 Hz
(A-A)
Dynamic Range (Notes 1,3) DR - -88 - -90 -97 - dB FS A
(A-A)
Total Harmonic Distortion+Noise (Notes 1,3) THD+N - -85 - -85 -90 - dB FS A
(A-A) -3 dB FS input

ABSOLUTE MAXIMUM RATINGS (AGND, DGND, SGND = 0 V, all voltages with respect to 0 V.)
Parameter Symbol Min Max Units
Power Supplies: Digital VD1 -0.3 6.0 V
VDF1-VDF3 -0.3 6.0 V
Analog VA -0.3 6.0 V
Total Power Dissipation (Supplies, Inputs, Outputs) - 1 W
Input Current per Pin (Except Supply Pins) -10.0 +10.0 mA
Output Current per Pin (Except Supply Pins) -50 +50 mA
Analog Input Voltage -0.3 VA+0.3 V
Digital Input Voltage: SA<15:0>, IOR, IOW, AEN
SD<7:0>, DACK<A:C> -0.3 VD1+0.3 V
All other digital inputs -0.3 VDF+0.3 V
Ambient Temperature (Power Applied) -55 +125 °C
Storage Temperature -65 +150 °C
Warning: Operation beyond these limits may result in permanent damage to the device.
Normal operation is not guaranteed at these extremes.

DS252PP2 5
CS4235
TM
CrystalClear Low Cost ISA Audio System

RECOMMENDED OPERATING CONDITIONS


(AGND, DGND, SGND = 0 V, all voltages with respect to 0 V.)
Parameter Symbol Min Typ Max Units
Power Supplies: Digital (Note 5) VD1 4.75 5.0 5.25 V
Digital Filtered VDF1-VDF3 4.75 5.0 5.25 V
Analog VA 4.75 5.0 5.25 V
Operating Ambient Temperature TA 0 25 70 °C
Note 5: VD1 supplies the power to the ISA interface pins.

ADC1/DAC1 DIGITAL FILTER CHARACTERISTICS (Note 1)


Parameter Symbol Min Typ Max Units
Passband 0 - 0.40xFs Hz
Frequency Response -1.0 - +0.5 dB
Passband Ripple (0-0.40xFs) - - ±0.1 dB
Transition Band 0.40xFs - 0.60xFs Hz
Stop Band 0.60xFs - - Hz
Stop Band Rejection 74 - - dB
Group Delay - - 10/Fs s
Group Delay Variation vs. Frequency ADC1 - - 0.0 µs
DAC1 - - 0.1/Fs µs

DIGITAL CHARACTERISTICS
(TA = 25 °C; VA, VDF1-VDF3 = +5 V, VD1 = +5 V; AGND, DGND1, SGND1-SGND4 = 0 V.)
Parameter Symbol Min Max Units
High-level Input Voltage UP/DOWN/MUTE VIH 3.0 - V
Other Digital Inputs 2.0 - V
XTALI VDF-1.0 - V
Low-level Input Voltage VIL - 0.8 V
High-level Output Voltage: ISA Bus Pins I0 = -24.0 mA VOH 2.4 VD1 V
IOCHRDY, SDA (Note 6) - VDF V
All Others I0 = -1.0 mA 2.4 VDF V
Low-level Output Voltage: ISA Bus Pins I0 = 24.0 mA VOL - 0.4 V
MCLK, SDOUT, MIDOUT, IOCHRDY I0 = 8.0 mA - 0.4 V
All Others I0 = 4.0 mA - 0.4 V
Input Leakage Current (Digital Inputs) -10 10 µA
Output Leakage Current (High-Z Digital Outputs) -10 10 µA
Note 6. Open Collector pins. High level output voltage dependent on external pull up (required) used and
number of peripherals (gates) attached.

6 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

Timing Parameters (TA = 25 °C; VA, VD1, VDF1-VDF3 = +5 V; outputs loaded with 30 pF;
Input Levels: Logic 0 = 0 V, Logic 1 = VDF, Rise/Fall time = 2 ns; Input/Output reference levels = 2.5 V)
Parameter Symbol Min Max Units
E2PROM Timing (Note 1)
SCL Low to SDA Data Out Valid tAA 0 3.5 µs
Start Condition Hold Time tHD:STA 4.0 - µs
Clock Low Period tLSCL 4.7 - µs
Clock High Period tHSCL 4.0 - µs
Start Condition Setup Time (for a Repeated Start Condition) tSU:STA 4.7 - µs
Data In Hold Time tHD:DAT 0 - µs
Data In Setup Time tSU:DAT 250 - ns
SDA and SCL Rise Time (Note 7) tR - 1 µs
SDA and SCL Fall Time tF - 300 ns
Stop Condition Setup Time tSU:STO 4.7 - µs
Data Out Hold Time tDH 0 - ns
Notes 7. Rise time on SDA is determined by the capacitance of the SDA line with all connected gates and the
external pullup resistor required.

tHSCL tLSCL
tF tR

SCL

t SU:STA t HD:STA t HD:DAT t SU:DAT t SU:STO

SDA (IN)

t AA tDH

SDA (OUT)

E2PROM 2-Wire Interface Timing

DS252PP2 7
CS4235
TM
CrystalClear Low Cost ISA Audio System

TIMING PARAMETERS (Continued)


Parameter Symbol Min Max Units
Parallel Bus Timing
IOW or IOR strobe width tSTW 90 - ns
Data valid to IOW rising edge (write cycle) tWDSU 22 - ns
IOR falling edge to data valid (read cycle) tRDDV - 60 ns
SA <> and AEN setup to IOR or IOW falling edge tADSU 22 - ns
SA <> and AEN hold from IOW or IOR rising edge tADHD 10 - ns
DACK<> inactive to IOW or IOR falling edge (DMA cycle tSUDK1 60 - ns
immediately followed by a non-DMA cycle) (Note 8)
DACK<> active from IOW or IOR rising edge (non-DMA tSUDK2 0 - ns
cycle completion followed by DMA cycle) (Note 8)
DACK<> setup to IOR falling edge (DMA cycles) tDKSUa 25 - ns
DACK<> setup to IOW falling edge (Note 8) tDKSUb 25 - ns
Data hold from IOW rising edge tDHD2 15 - ns
DRQ<> hold from IOW or IOR falling edge DTM(I10) = 0 tDRHD - 45 ns
(assumes no more DMA cycles needed) DTM(I10) = 1 -25 -
Time between rising edge of IOW or IOR to next falling tBWDN 80 - ns
edge of IOW or IOR
Data hold from IOR rising edge tDHD1 0 25 ns
DACK<> hold from IOW rising edge tDKHDa 25 - ns
DACK<> hold from IOR rising edge tDKHDb 25 - ns
RESDRV pulse width high (Note 1) tRESDRV 1 - ms
Initialization Time (Note 1, 9) tINIT 3 10 ms
EEPROM Read Time (Note 1, 10) tEEPROM 1 190 ms
XTAL, 16.9344 MHz, frequency (Notes 1, 11) 16.92 16.95 MHz
XTALI high time (Notes 1, 11) 24 - ns
XTALI low time (Notes 1, 11) 24 - ns
Sample Frequency (Note 1) Fs 3.918 50 kHz
CS4610 DSP Serial Port Timing
SCLK rising to SDOUT valid (Note 1) tPD1 - 60 ns
SCLK rising to FSYNC transition (Note 1) tPD2 -20 20 ns
SDIN valid to SCLK falling (Note 1) tS1 30 - ns
SDIN hold after SCLK falling (Note 1) tH1 30 - ns
Notes: 8. AEN must be high during DMA cycles.
9. Initialization time depends on the power supply circuitry, as well as the the type of clock used.
10. EEPROM read time is dependent on amount of data in EEPROM. Minimum time relates to no
EEPROM present. Maximum time relates to EEPROM data size of 1k bytes.
11. The Sample frequency specification must not be exceeded.

8 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

t
pd2
FSYNC SF1,0=01,10

t t
pd2 pd2
FSYNC SF1,0=00

SCLK
t
t s1
sckw t
h1
SDIN MSB, Left

SDOUT MSB, Left


t
pd1

CS4610 DSP Serial Port Timing

DRQ<>

t DKSUa t DRHD

DACK<>

t STW t DKHDb

IOR

t RDDV t DHD1

SD<7:0>

8-Bit Mono DMA Read/Capture Cycle

t RESDRV

RESDRV

t INIT t EEPROM

SCL/SDA EEPROM read

SD<>
Codec responds to ISA activity
SA<>

Reset Timing
DS252PP2 9
CS4235
TM
CrystalClear Low Cost ISA Audio System

DRQ<>

t DKSUb t DRHD

DACK<>

t STW t DKHDa

IOW

t WDSU t DHD2

SD<7:0>

8-Bit Mono DMA Write/Playback Cycle

DRQ<>

DACK<>

IOR/IOW

tBWDN

LEFT/LOW RIGHT/HIGH
SD<7:0> BYTE BYTE

8-Bit Stereo or 16-Bit Mono DMA Cycle

DRQ<>

DACK<>

IOR/IOW
t BWDN

LEFT/LOW LEFT/HIGH RIGHT/LOW RIGHT/HIGH


SD<7:0> BYTE BYTE BYTE BYTE

16-Bit Stereo DMA Cycle

10 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

DRQ<>

tSUDK1 tSUDK2

DACK<>

IOR

tRDDV tDHD1

SD<>

tADSU tADHD

SA<>

AEN

I/O Read Cycle

DRQ<>

tSUDK1 tSUDK2

DACK<>

tSTW

IOW

tWDSU tDHD2

SD<>

tADSU tADHD

SA<>

AEN

I/O Write Cycle

DS252PP2 11
TM
CS4235
CrystalClear Low Cost ISA Audio System

GENERAL DESCRIPTION Interrupts and DMA channels. The WSS Codec,


This device is comprised of six physical devices FM synthesizer, and the SBPro compatible de-
along with Plug-and-Play support for one addi- vices are internal to the part.
tional external device. The internal devices are:
Windows Sound System Codec Logical Device 1 is the Game Port that supports
Sound Blaster Pro Compatible Interface up to two joystick devices.
Game Port (Joystick)
Control Logical Device 2 is the Control device that sup-
MPU-401 ports global features of the part. This device uses
FM Synthesizer I/O locations to control power management,
The external device is: joystick rate, and PnP resource data loading.
IDE CDROM
Logical Device 3 is the MPU-401 interface. The
On power up, this part requires a RESDRV sig- MPU-401 MIDI interface includes a 16-byte
nal to initialize the internal configuration. When FIFO for data transmitted out the MIDOUT pin
initially powered up, the part is isolated from the and a 16-byte FIFO for data received from the
bus, and each device supported by the part must MIDIN pin.
be activated via software. Once activated, each
device responds to the resources given (Address, Logical Device 4 supports an IDE CDROM de-
IRQ, and DMA channels). The devices listed vice. Although this logical device is listed as a
above are grouped into five logical devices, as CDROM, any external device that fits within the
shown in Figure 1 (bracketed features are sup- resources listed above may be substituted. This
ported, but typically not used). The five logical interface, is generic and can support devices us-
devices are: ing 1 to 127 I/O locations for the base address, 1
to 8 I/O locations for the alternate base address,
LOGICAL DEVICE 0: an interrupt, and a DMA channel.
Windows Sound System Codec (WSS Codec)
Adlib/Sound Blaster-compatible Synthesizer ISA Bus Interface
Sound Blaster Pro Compatible Interface The 8-bit parallel I/O and 8-bit parallel DMA
ports provide an interface which is compatible
LOGICAL DEVICE 1: Game Port with the Industry Standard Architecture (ISA)
bus. The ISA Interface enables the host to com-
LOGICAL DEVICE 2: Control municate with the various functional blocks
within the part via two types of accesses: Pro-
LOGICAL DEVICE 3: MPU401
grammed I/O (PIO) access, and DMA access.
LOGICAL DEVICE 4: CDROM
A number of configuration registers must be pro-
grammed prior to any accesses by the host
Logical Device 0 consists of three physical de- computer. The configuration registers are pro-
vices. The WSS Codec and the Synthesizer are grammed via a Plug-and-Play configuration
grouped together since the original Windows sequence or via configuration software provided
Sound System card expected an FM synthesizer by Cirrus Logic.
if the codec was present. The Sound Blaster Pro
Compatible interface, SBPro, is also grouped to
allow the WSS Codec and the SBPro to share

12 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

PnP ISA Bus


Interface

Logical Device 0 Logical Device 1 Logical Device 2 Logical Device 3 Logical Device 4

WSS Codec: Game Port: Control: MPU-401: CDROM:


I/O: WSSbase I/O: GAMEbase I/O: CTRLbase I/O: MPUbase I/O:
2 DMA Chan. [1 Interrupt] 1 Interrupt CDbase
1 Interrupt ACDbase
[1 Interrupt]
[1 DMA Chan.]
Figure 1. Logical Devices
Synthesis:
I/O: SYNbase
[1 Interrupt]
Port, MPU-401, and CDROM devices support
10-bit address decoding, while the Windows
SBPro: Sound System and Control devices support 12-
I/O: SBbase
bit address decoding. Devices that support 10-bit
(DMA shared) address decoding, require A10 and A11 be zero
(Interrupt shared) for proper decode; therefore, no aliasing occurs
through the 12-bit address space.

I/O CYCLES To prevent aliasing into the upper address space,


Every device that is enabled, requires I/O space. a "16-bit decode" option may be used, where the
An I/O cycle begins when the part decodes a upper address bits SA12 through SA15 are con-
valid address on the bus while the DMA ac- nected to the part. SA12-SA15 are then decoded
knowledge signals are inactive and AEN is low. to be 0,0,0,0 for all logical device address de-
The IOR and IOW signals determine the direc- coding. When the upper address bits are used,
tion of the data transfer. For read cycles, the part the CDROM interface is no longer available
will drive data on the SD<7:0> lines while the since the upper address pins are multiplexed
host asserts the IOR strobe. Write cycles require with the CDROM pins (See Reset and Power
the host to assert data on the SD<7:0> lines and Down section). If the CDROM is needed, the
strobe the IOW signal. Data is latched on the ris- circuit shown in Figure 2 can replace the SA12
ing edge of the IOW strobe. through SA15 pins and provide the same func-
tionality. Four cascaded OR gates, using a
I/O ADDRESS DECODING 74ALS32, can replace the ALS138 in Figure 2,
The logical devices use 10-bit or 12-bit address but causes a greater delay in address decoding.
decoding. The Synthesizer, Sound Blaster, Game

DS252PP2 13
TM
CS4235
CrystalClear Low Cost ISA Audio System

eight bits at a time. The request pin stays active


ISA Bus 74ALS138 until the appropriate number of 8-bit cycles have
1 15
SA12 A Y0 AEN occurred. The number of 8-bit transfers will vary
2
SA13 B Y1 depending on the digital audio data format, bit
SA14 3 resolution, and operation mode.
C Y2
Y3
The DMA request signal can be asserted at any
Y4
4 time. Once asserted, the DMA request will re-
SA15 G2A Y5
main asserted until a complete DMA cycle
5 Y6
AEN G2B occurs. A complete DMA cycle consists of one
6
+5V G1 Y7 or more bytes depending on which device inter-
nal to the part is generating the request.
Figure 2. 16-bit Decode Circuit
INTERRUPTS
For Plug-and-Play flexibility, seven interrupt
DMA CYCLES pins are supported, although only one or two are
typically used. The default hardware connec-
The part supports up to three 8-bit ISA-compat-
tions, which can be modified through the
ible DMA channels. The default hardware
hardware configuration data, are:
connections, which can be changed through the
IRQ A = ISA Interrupt 5
hardware configuration data, are:
IRQ B = ISA Interrupt 7
DMA A = ISA DMA channel 0
IRQ C = ISA Interrupt 9
DMA B = ISA DMA channel 1
IRQ D = ISA Interrupt 11
DMA C = ISA DMA channel 3
IRQ E = ISA Interrupt 12
IRQ F = ISA Interrupt 15
The typical configuration would require two
DMA channels. One for the WSS Codec and
IRQ G is new and defaults to not being con-
Sound Blaster playback, and the other for WSS
nected for backwards compatibility. This new
Codec capture (to support full-duplex). The
interrupt pin would typically be connected to
CDROM, if used, can also support a DMA chan-
ISA Interrupt 10. New designs that use IRQ G
nel, although this is not typical.
must change the Hardware Configuration Data to
indicate which ISA Interrupt is connected to
DMA cycles are distinguished from control reg-
IRQ G.
ister cycles by the generation of a DRQ (DMA
Request). The host acknowledges the request by
The typical configuration would support two in-
generating a DACK (DMA Acknowledge) sig-
terrupt sources: one shared between the WSS
nal. The transfer of audio data occurs during the
Codec and the Sound Blaster Pro compatible de-
DACK cycle. During the DACK cycle the ad-
vices, and the other for the MPU401 device.
dress lines are ignored.
Interrupts are also supported for the FM Synthe-
sizer, Control, and CDROM devices, but are
The digital audio data interface uses DMA re-
typically not used.
quest/grant pins to transfer the digital audio data
between the part and the ISA bus. Upon receipt
of a DMA request, the host processor responds
with an acknowledge signal and a command
strobe which transfers data to and from the part,

14 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

PLUG AND PLAY refer to the latest revision of the Plug and Play
The Plug-and-Play (PnP) interface logic is com- BIOS Specification published by Compaq Com-
patible with the Intel/Microsoft Plug-and-Play puter, Phoenix Technologies, and Intel.
specification, version 1.0a, for an ISA-bus de-
vice. Since the part is an ISA-bus device, it only The Plug and Play configuration sequence maps
supports ISA-compatible IRQs and DMA chan- the various functional blocks of the part (logical
nels. Plug and Play compatibility allows the PC devices) into the host system address space and
to automatically configure the part into the sys- configures both the DMA and interrupt channels.
tem upon power up. Plug and Play capability The host has access to the part via three 8-bit
optimally resolves conflicts between Plug and auto-configuration ports: Address port (0279h),
Play and non-Plug and Play devices within the Write Data port (0A79h), and relocatable Read
system. Alternatively, the PnP feature can be by- Data port (020Bh - 03FFh). The read data port is
passed. See the Bypassing PnP section for more relocated automatically by PnP software when a
information. For a detailed Plug-and-Play proto- conflict occurs. Note that the Address Port can
col description, please refer to the Plug and Play be moved for motherboard devices. See the Ad-
ISA Specification. dress Port Configuration section for more
details.
To support Plug-and-Play in ISA systems that do
not have a PnP BIOS or a PnP-aware operating The configuration sequence is as follows:
system, the Configuration Manager (CM) TSR
and an ISA Configuration Utility (ICU) from In- 1. Host sends a software key which places all
tel Corp. are used to provide these functions. PnP cards in the sleep state (or Plug-and-
The CM isolates the cards, assigns Card Select Play mode).
Numbers, reads PnP card resource requirements,
and allocates resources to the cards based on 2. The CS4235 is isolated from the system using
system resource availability. The ICU is used to an isolation sequence.
keep the BIOS and the CM informed of the cur-
rent system configuration. It also aids users in 3. A unique identifier (handle) is assigned to the
determining configurations for non-PnP ISA part and the resource data is read.
cards. A more thorough discussion of the Con-
figuration Manager and the ISA Configuration 4. After all cards’ resource requirements are de-
Utility can be found in the Product Development termined, the host uses the handle to assign
Information document of the Plug and Play Kit conflict-free resources
by Intel Corp. In a PnP BIOS system, the BIOS
is responsible for configuring all system board 5. After the configuration registers have been
PnP devices. Some systems require additional programmed, each configured logical device
software to aid the BIOS in configuring PnP ISA is activated.
cards. The PnP BIOS can execute all PnP func-
tions independently of the type of operating 6. The part is then removed from Plug-and-Play
system. However, if a PnP aware operating sys- mode.
tem is present, the PnP responsibilities are shared
between the BIOS and the operating system. For Upon power-up, the chip is inactive and must be
more information regarding PnP BIOS, please enabled via software. The CS4235 monitors
writes to the Address Port . If the host sends a
PnP initiation key, consisting of a series of 32
predefined byte writes, the hardware will detect

DS252PP2 15
TM
CS4235
CrystalClear Low Cost ISA Audio System

the key and place the part into the Plug-and-Play To load the data, refer to the Loading Resource
(PnP) mode. Another method to program the part Data section. The following is the Plug-and-Play
is to use a special Crystal initiation key which resource data:
functions like the PnP initiation key, but can be
invoked by the user at any time. However, the The first nine bytes of the PnP resource data are
Crystal Key only supports one Audio Codec per the Plug-and-Play ID, which uniquely identifies
system. The Crystal key and special commands the Audio Codec from other PnP devices. The
are detailed in the Crystal Key and Bypassing PnP ID is broken down as follows:
PnP sections. 0Eh, 63h - Crystal ID - ’CSC’ in compressed
ASCII. (See the PnP Spec for more
The isolation sequence uses a unique 72-bit se- information)
rial identifier. The host performs 72 pairs of I/O 42h - OEM ID. A unique OEM ID must be ob-
read accesses to the Read Data port. The identi- tained from Crystal for each unique
fier determines what data is put on the data bus Crystal product used.
in response to those read accesses. When the iso- 25h - Crystal product ID for the CS4235
lation sequence is complete, the CM assigns a FFh, FFh, FFh, FFh - Serial number. This can
Card Select Number (CSN) to the part. This be modified by each OEM to uniquely
number distinguishes the CS4235 from the other identify their card.
PnP devices in the system. The Configuration ??h - Checksum.
Manager (CM) then reads the resource data from
the CS4235. The 72-bit identifier and the re- Of the 9-byte serial number listed above, Cirrus
source data is either stored in an external software uses the first two bytes to indicate the
user-programmable E2PROM, or loaded via a presence of a CS4235, and the fourth byte, 0x25,
"hostload" procedure from BIOS before PnP to indicate the CS4235; therefore, these three
software is initiated. bytes must not be altered. The default PnP ID, in
hex, is 0E634236FFFFFFFFA9 for backwards
The CM determines the necessary resource re- compatibility.
quirements for the system and then programs the
part through the configuration registers. The con- The next 3 bytes are the PnP version number.
figuration register data is written one logical The default is version 1.0a: 0Ah, 10h, 05h.
device at a time. After all logical devices have
been configured, CM activates each device indi- The next sequence of bytes are the ANSI identi-
vidually. Each logical device is now available on fier string. The default is: 82h, 0Eh, 00h,
the ISA bus and responds to the programmed ’Crystal Codec’, 00h.
address range, DMA channels, and interrupts that
have been allocated to that logical device. The logical device data must be entered using
the PnP ISA Specification format. Typical logical
PnP Data device values are found in Table 1. Internal de-
Hardware Configuration and Plug-and-Play re- fault E2PROM data is found in Appendix A.
source data can be loaded into the part’s RAM.
The data may be stored in an external E2PROM Loading Resource Data
or may be downloaded from the host. Internal A serial E2PROM interface allows user-program-
default PnP data is provided for motherboard de- mable serial number and resource data to be
signs. stored in an external E2PROM. The interface is
compatible with devices from a number of ven-

16 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

dors and the size may vary according to specific bytes from the E2PROM interface. If the first
customer requirements. The maximum size for two bytes from the E2PROM port read 55h and
resource data supported by the part’s internal BBh, then the rest of the E2PROM data is
RAM is 384 bytes of combined Hardware Con- loaded into the internal RAM. If the first two
figuration and PnP resource data. With the bytes aren’t correct, the E2PROM is assumed not
addition of the 4-byte header, the maximum to exist. For motherboard designs, internal de-
amount of E2PROM space used would be 388 fault PnP data is provided or a Hostload
bytes. However, the part also supports firmware sequence can be used to update the resource
upgrades via the E2PROM. To support firmware data. If the part is installed on a plug-in card,
upgrades, the E2PROM size must be greater than then an external E2PROM is required to ensure
770 bytes. After power-up, the existence of an that the proper PnP resource data is loaded into
E2PROM is checked by reading the first two the internal RAM prior to a PnP sequence. See

Physical Device Logical Device Best Choice Acceptable Sub optimal Sub optimal
Choice 1 Choice 1 Choice 2
WSS 0 ANSI ID = CSC0000 ANSI ID = WSS/SB
16-bit address WSSbase 534h 534-FFCh 534-FFCh
decode Length/Alignment 4/4 4/4 4/4
high true IRQ 5 5,7,9,11,12,15 5, 7, 9, 11, 12, 15
edge sensitive (SB share) (SB share) (SB share)
8-bit, count by DMA0 1 1, 3 0, 1, 3
byte, type A (playback) (SB share) (SB share) (SB share)
same DMA1 0, 3 0, 1, 3 ----
(record)
Synthesis 0
16-bit address SYNbase 388h 388h 388-3F8h
decode Length/Alignment 4/8 4/8 4/8
IRQ ---- ---- ----
SB Pro 0
16-bit address SBbase 220h 220-260h 220-300h
decode Length/Alignment 16/32 16/32 16/32
Game Port 1 ANSI ID = CSC0001 ANSI ID = GAME
16-bit address GAMEbase 200h 208h
decode Length/Alignment 8/8 8/8
Control 2 ANSI ID = CSC0010 ANSI ID = CTRL
16-bit address CTRLbase 120-FF8h
decode Length/Alignment 8/8
IRQ ----
MPU401 3 ANSI ID = CSC0003 ANSI ID = MPU
16-bit address MPUbase 330h 330-360h 330-3E0h
decode Length/Alignment 2/8 2/8 2/8
IRQ 9 9,11,12,15 ----

---- Feature not supported in the listed configuration, but is supported through customization.

Table 1. Typical Motherboard Plug-and-Play Resource Data

DS252PP2 17
TM
CS4235
CrystalClear Low Cost ISA Audio System

the External E2PROM section for more informa- patches in E2PROM, gives the maximum func-
tion on the serial E2PROM interface and tionality at power-up without the need for a
E2PROM programming. software driver.

The format for the data stored in the E2PROM is The firmware patch data is typically included at
as follows: the end of the PnP resource data. Cirrus provides
a utility that will read in patch data from a file,
2 bytes E2PROM validation: 55h, BBh and append it to the PnP resource data. The
patch file must be obtained from Cirrus.
2 bytes length of resource data in E2PROM
The Crystal Key
19 bytes Hardware Configuration
NOTE: The Crystal Key cannot differentiate be-
9 bytes Plug and Play ID tween multiple Cirrus Audio Codecs in a system;
therefore, ONLY ONE audio part is allowed in
3 bytes Plug and Play version number systems using the Crystal Key. To allow multiple
parts in a system, the Plug-and-Play isolation se-
Variable number of bytes of user defined quence must be used since it supports multiple
ASCII ID string parts via the serial identifier used in the isolation
sequence. Crystal Key 2 is also designed to al-
Logical Device 0 (Windows Sound System, low motherboard and add-in card chips to
FM Synthesizer, Sound Blaster Pro) data co-exist in a system.
Logical Device 1 ( Game Port) data
The Crystal key places the part in the configura-
Logical Device 2 ( Control) data tion mode. Once the Crystal key has been
initiated, an alternate method of programming
Logical Device 3 ( MPU-401) data the configuration registers may be used. This al-
ternate method is referred to as the "SLAM"
Logical Device 4 ( CD-ROM) data method. The SLAM method allows the user to
directly access the configuration registers, con-
End of Resource byte & checksum byte f igure, and activate the chip, and then,
optionally, disable the PnP and/or Crystal key
Firmware patch code. feature. The SLAM method uses commands that
are similar to the PnP commands; however, they
The default internal E2PROM data, in assembly are different since the user has direct access to
format, can be found in Appendix A. the configuration registers. To use the SLAM
method, see the Bypassing PnP section.
Loading Firmware Patch Data
An external E2PROM is read during the power- The following 32 bytes, in hex, are the Crystal
up sequence that stores Hardware Configuration key:
and PnP data, and firmware patch data. The part 96, 35, 9A, CD, E6, F3, 79, BC,
contains RAM and ROM to run the core proces-
sor. The RAM allows updates to the core 5E, AF, 57, 2B, 15, 8A, C5, E2,
processor functionality. Placing the firmware F1, F8, 7C, 3E, 9F, 4F, 27, 13,
09, 84, 42, A1, D0, 68, 34, 1A

18 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

Interrupt Select 0 (22h, xxh)


Bypassing Plug and Play
Interrupt Select 1 (27h, xxh)
The SLAM method allows the user to bypass the
Plug and Play features and, as an option, allows DMA Select 0 (2Ah, xxh)
the part to act like a non-Plug and Play or legacy
device; however, the SLAM method only sup- DMA Select 1 (25h, xxh)
ports one Cirrus Audio IC per system. The user
directly programs the resources into the part, and Activate Device (33h, 01h)
then optionally disables the PnP and/or the Crys- (33h, 00h deactivates a device)
tal Key, which forces the part to disregard any
future PnP or Crystal initiation key sequences 4. Repeat #3 for each logical device to be en-
(All activated logical devices appear as legacy abled. (Not all devices need be enabled.)
devices to PnP). The Crystal and PnP keys can
also be disabled through the E2PROM. The 5. Host activates chip by writing a 79h to AP.
SLAM method uses the Address Port (AP) simi-
larly to Plug-and-Play. Although the standard AP 6. (Optional) Host disables PnP Key by writing
is 279h, two other selections are available for a 55h to CTRLbase+5. The part will not par-
non-standard implementations. See the Address ticipate in any future PnP cycles. The Crystal
Port Configuration section for more details. Key can also be disabled by writing a 56h to
CTRLbase+5.
To use the SLAM method, the following se-
quence must be followed: NOTE: To enable the PnP/Crystal Keys after
they have been disabled by the SLAM
1. Host sends 32-byte Crystal key to the AP, method, bring the RESDRV pin to a logic
chip enters configuration mode. high or remove power from the device.

2. Host programs CSN (Card Select Number) The following illustrates typical data sent using
by writing a 06h and 00h to the AP. the SLAM method.
006h, 001h ; CSN=1
3. Host programs the configuration registers of
each logical device by writing to the AP. The 015h, 000h ; LOGICAL DEVICE 0
following data is the maximum amount of in- 047h, 005h, 034h ; WSSbase = 0x534
formation per device. All current devices only 048h, 003h, 088h ; SYNbase = 0x388
need a subset of this data: 042h, 002h, 020h ; SBbase = 0x220
Logical Device ID (15h, xxh) 022h, 005h ; WSS & SB IRQ = 5
xxh is logical device number: 0-5 02Ah, 001h ; WSS & SB DMA0 = 1
025h, 003h ; WSS capture DMA1 = 3
I/O Port Base Address 0 (47h, xxh, xxh) 033h, 001h ; activate logical device 0
high byte , low byte
015h, 001h ; LOGICAL DEVICE 1
I/O Port Base Address 1 (48h, xxh, xxh) 047h, 002h, 000h ; GAMEbase = 0x200
high byte , low byte 033h, 001h ; activate logical device 1
I/O Port Base Address 2 (42h, xxh, xxh)
high byte , low byte

DS252PP2 19
TM
CS4235
CrystalClear Low Cost ISA Audio System

015h, 002h ; LOGICAL DEVICE 2 CK2 differs from normal PnP in that the RDP is
047h, 001h, 020h ; CTRLbase = 0x120 read/write instead of read-only. In PnP the RDP
033h, 001h ; activate logical device 2 is read-only and a second address, designated the
Write Data Port (0xA79), is used to write data
015h, 003h ; LOGICAL DEVICE 3 into PnP registers. Using CK2, all configuration
047h, 003h, 030h ; MPUbase=0x330 is done through the RDP, there is no Write Data
Port. When finished, a Wait-for-Key command
022h, 009h ; MPU IRQ = 9 should be issued to the Address Port which
033h, 001h ; activate logical device 3 places the part back in the normal mode of op-
eration. Note that the Address Port (AP) can also
079h ; activate audio device be moved away from the normal PnP location of
0x279. See the Address Port Configuration sec-
If all the above data is sent, after the Crystal key, tion for more information.
all devices except the CDROM will respond to
the appropriate resources given. The CK2 configuration sequence is as follows:

Crystal Key 2 1. CK2 32 bytes are sent to the Address Port fol-
A new feature of this part is the addition of an- lowed by the upper 8 bits of the RDP.
other way to bypass the PnP interface using a
new key, designated Crystal Key 2 (CK2). This 2. The AP and RDP are used to read/write con-
new key is designed for Codecs on the mother- figuration information in normal PnP fashion.
board that are hidden from normal PnP. The
following 32 bytes, in hex, are Crystal Key 2 6. A Wait-for-Key command is sent removing
followed by the upper 8 bits of the Read Data the part from the configuration state.
port (RDP):
95, B1, D8, 6C, 36, 9B, 4D, A6, The particular PnP register is set using the Ad-
dress Port and the data for that register is
D3, 69, B4, 5A, AD, D6, EB, 75, read/written to/from the RDP. As an example,
BA, DD, EE, F7, 7B, 3D, 9E, CF, when finished configuring the part, to send the
Wait-for-Key command, a 0x02 is sent to the AP
67, 33, 19, 8C, 46, A3, 51, A8, <RDP> (selecting the Config. Control register) and a
0x02 is sent to the RDP. This causes the part to
This key differs greatly from the original Crystal exit the configuration state and enter normal op-
Key in that the 33rd byte defines the upper 8 bits eration (Wait-for-Key).
of the 10-bit Read Data port address, with the
lower 2 bits equal to 11. As an example, if the Hardware Configuration Data
RDP byte is 0x82, then the actual Read Data The Hardware Configuration data contains map-
port is 0x20B. Another difference is that the ping information that links interrupt and DMA
original Crystal Key uses custom commands and pins with actual interrupt numbers used by PnP
is write-only; whereas, CK2 places the part in a
and SLAM procedures. The Hardware Configu-
PnP Configuration state and uses standard PnP ration data precedes the PnP Resource data.
commands to access PnP configuration registers.
Since CK2 is unique to the CS4235, the PnP iso- The Hardware Configuration data is either 19 or
lation sequence is bypassed. 23 bytes long and contains the data necessary to
configure the part. If an E2PROM is not used

20 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

(Hostload), the first four bytes are not needed; listed as "res" in the bit position (and should be
therefore, the configuration data is only 19 bytes written to 0), "rbc" is "reserved, backwards com-
long. The configuration data maps the many patible" for bits that were used on previous
functions of the logical devices to the physical chips, but are no longer required on this chip.
pins of the chip. Table 2 lists the Hardware Con- These bits are read/writable but should generally
figuration bytes. The detailed bit descriptions for be set to 0 for backwards compatibility.
each byte follows. While the reserved bits are

BYTE Default Description


2
1 55h E PROM validation byte 1.
The first two bytes indicate that the E2PROM exists.
2 BBh E2PROM validation byte 2
3 00h High byte for length of data in E2PROM
4 DDh Low byte for length of data in E2PROM
5 00h Alternate CDROM (Logical Device 4), ACDbase, Address length mask
6 03h RESERVED
7 80h Misc. Configuration Bits: CDROM Interrupt Polarity, Key Disables, VCEN
8 00h Global Configuration Byte: IFM, VCF1, WTEN
9 05h Code Base Byte
10 20h FM Volume Scaling
11* 04h RESERVED - Must be 0x04
12* 08h RESERVED - Must be 0x08
13* 10h RESERVED - Must be 0x10
14 80h Mono and DSP Port Control
15 00h E2PROM Checksum
16 00h Global Configuration Byte 2: EECS, AUX1R, 3DEN, DSPD1, PSH
17 08h CDROM (Logical Device 4), CDbase, Address length
18* 48h RESERVED - Must be 0x48
19 75h IRQ A/B Selection: Lower nibble = A, Upper nibble = B.
Along with next two bytes - specify hardware interrupts tied to IRQA-IRQF pins
20 B9h IRQ C/D Selection: Lower nibble = C, Upper nibble = D.
21 FCh IRQ E/F Selection: Lower nibble = E, Upper nibble = F.
22 10h DMA A/B Selection: Lower nibble = A, Upper nibble = B.
This byte and the next byte specify hardware DRQ/DACKs tied to the DMAA-DMAC pins
and the 7th IRQ pin - IRQ G
23 03h DMA C/IRQ G Selection: Lower nibble = DMA C, Upper nibble = IRQ G

NOTE:The first four bytes are exclusive to the E2PROM and are not used in the Hostload mode.
* Currently not supported. Must be set to default values given in the table.

Table 2. Hardware Configuration Data

DS252PP2 21
TM
CS4235
CrystalClear Low Cost ISA Audio System

HW Config. Byte 5: ACDbase Address Length HW Config. Byte 8: Global Configuration Byte,
Mask, Default = 00000000 Default = 10000000
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
res res res res res CM2 CM1 CM0 IFM VCF1 rbc res WTEN rbc res res

CM2-CM0 Address bit masks for the Alternate WTEN Wavetable Serial Port Enable. When
CDROM address decode, ACDbase. set, enables the CS9236 Single-
See the CDROM Interface section Chip Wavetable Music Synthesizer
for more details on ACDbase. serial port pins. This function is also
ACDbase must be on the same para- available in C8. NOTE: The DSP
graph boundry as the address lengh SPE bit in I16 must be 0 for the
decode. wavetable port to be enabled.

000 - ACDCS low for 1 byte VCF1 Hardware Volume Control Format.
001 - ACDCS low for 2 bytes This bit controls the format of the
011 - ACDCS low for 4 bytes hardware volume control pins UP,
111 - ACDCS low for 8 bytes DOWN, and MUTE. The volume con-
xxx - all others, RESERVED trol is enabled by setting VCEN in
the previous Hardware Configuration
byte. VCF1 is also available through
HW Config. Byte 7: Misc. Configuration Bits,
C8.
Default = 10000000
D7 D6 D5 D4 D3 D2 D1 D0 0 - MUTE is a momentary switch.
IHCD rbc PKD CKD CK2D VCEN rbc rbc MUTE toggles between mute and
un-mute. Pressing the up or down
VCEN Volume Control Enable. When set, switch always un-mutes.
the UP, DOWN, and MUTE pins be- 1 - MUTE is not used. Two button
come active and provide a hardware volume control. Pressing the up
master volume control. and down buttons simultaneously
causes the volume to mute.
CK2D Crystal Key 2 disable. When set, Pressing up or down un-mutes.
blocks the part from receiving the
2nd Crystal key. IFM Internal FM. When set, the internal
FM synthesizer is enabled. When
CKD Crystal Key disable. When set, blocks clear, FM is disabled.
the part from receiving the Crystal
key. HW Config. Byte 9: Code Base Byte,
PKD PnP Key disable. When set, blocks
Default = 00000101
the part from receiving the Plug-and- D7 D6 D5 D4 D3 D2 D1 D0
Play key. CB7 CB6 CB5 CB4 CB3 CB2 CB1 CB0

IHCD Interrupt High - CDROM. When set, CB7-CB0 Code Base Byte. Determines the code
CDINT is active high. When clear, base located in the E2PROM. If not
CDINT is active low. correct, the Firmware code after the
PnP resource data is not loaded.

0x05 - CS4235 E2PROM Load


0x06 - CS4235 Host Load

22 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

MIM Mono In mute. When set, the MIN


analog input is muted. When clear,
HW Config. Byte 10: FM Volume Scaling,
MIN is mixed into the output mixer
Default = 00100000 at a level set by MIA.
D7 D6 D5 D4 D3 D2 D1 D0
res FMS2 FMS1 FMS0 res res res res
HW Config. Byte 15: E2PROM Checksum
FMS2-FMS0 FM Volume Scaling relative to wave- Default = xxxxxxxx
table digital input. These bits set the D7 D6 D5 D4 D3 D2 D1 D0
default FM volume level relative to EC7 EC6 EC5 EC4 EC3 EC2 EC1 EC0
the CS9236 wavetable interface
port. Once initialized, these bits can EC7-EC0 E2PROM checksum byte. Starts with
be controlled through X19. These the first byte of the size (after
bits are provided for backwards com- 55h/BBh) and ends with the last pro-
patibility with previous chips. grammed byte of the E2PROM. Only
valid if EECS in Hardware Configura-
010 - 0 dB tion Byte 16 is set.
011 - +6 dB
100 - -12 dB
101 - -6 dB HW Config. Byte 16: Global Config. Byte 2
110 - +12 dB Default = 00000000
111 - +18 dB D7 D6 D5 D4 D3 D2 D1 D0
res EECS AUX1R 3DEN DSPD1 PSH res res
HW Config. Byte 14: Mono & DSP Port
This register sets the power up defaults for these fea-
Control, Default = 10000000 tures. After power-up, X18 may be used to control all
D7 D6 D5 D4 D3 D2 D1 D0 bits except EECS.
MIM res res res SF1 SF0 SPE MIA
PSH Playback Sample Hold. When set, the
This register sets the power up defaults for these fea- last sample is held in DAC1 when
tures. After power-up, I16 may be used to control the PEN is cleared. When clear, zero is
DSP serial port, and I26 may be used to control the sent to DAC1 when PEN is cleared.
Mono Input.
DSPD1 DSP port controls DAC1. When set,
MIA Mono Input Attenuate. When set, the the serial DSP port controls DAC1 in-
MIN input is attenuated 9 dB. When stead of the ISA playback FIFO.
clear, the MIN volume is 0 dB.
3DEN 3D Sound Enable. When set, 3D
SPE DSP Serial Port Enable. When set, sound is enabled on L/ROUT.
the DSP serial port is enabled.
AUX1R AUX1 Remap. When set, writes to
SF1,0 DSP Serial Port Format. Selects the I18/19 (DAC2 volume) also control
format of the serial port once en- the AUX1 volume. When clear,
abled by SPE. See the DSP Serial I18/19 control DAC2 volume and
Audio Data Port section for more de- I2/3 control AUX1 volume. This bit
tails. provides some backwards compatibil-
ity when AUX1 analog inputs are
00 - 64-bit enhanced. substituted for LINE analog inputs
01 - 64 bit. which are no longer available.
10 - 32 bit.
11 - ADC/DAC. EECS EEPROM Checksum. If set, indicates
that Hardware Configuration Byte 15
is a checksum for the entire
EEPROM (starting after 55h/BBh).

DS252PP2 23
TM
CS4235
CrystalClear Low Cost ISA Audio System

HW Config. Byte 17: CDbase Address Length, Hostload Procedure


Default = 00000100 This procedure is provided for backwards com-
D7 D6 D5 D4 D3 D2 D1 D0 patibility with the CS4236. Since the E2PROM
CAL7 CAL6 CAL5 CAL4 CAL3 CAL2 CAL1 CAL0 allows all resource and firmware patch data to be
loaded at power-up, this procedure is typically
CAL7-CAL0 CDbase Address Length. Determines only used with motherboard devices that do not
the address length decode for the include an E2PROM. To download PnP resource
primary CDROM address, CDbase.
CDbase must be on the same para- data from the host to the part’s internal RAM,
graph boundry as the address lengh use the following sequence:
decode.
1. Configure Control I/O base address,
00000001 - CDCS low for 1 byte CTRLbase, by one of two methods: regular
00000010 - CDCS low for 2 bytes
00000100 - CDCS low for 4 bytes PnP cycle or Crystal Key method.
00001000 - CDCS low for 8 bytes
00010000 - CDCS low for 16 bytes a. The host can use the regular PnP cycle to
00100000 - CDCS low for 32 bytes program the CTRLbase, and then place the
01000000 - CDCS low for 64 bytes chip in the wait_for_key_state
10000000 - CDCS low for 128 bytes
xxx - all others, RESERVED
b. If the Crystal Key method is used:
Bytes 19 through 21 map the interrupt number to
First, send the 32-byte Crystal key to I/O
the actual interrupt pins A - F. As shown in Ta-
address port (AP).
ble 2, the byte 20 default is 0xB9; therefore,
IRQ C, which is the lower nibble, maps to the Second, configure logical device 2 base
ISA interrupt 9. Likewise IRQ D, which is the address, CTRLbase, by writing to AP
upper nibble, maps to the ISA interrupt 11 (15h, 02h, 47h, xxh, xxh, 33h, 01h, 79h).
(0Bh). Note: The two xxh represent the base_ad-
dress_high and base_address_low
Byte 22 maps the DMA channel number to the respectively. The default is: 01h, 20h.
actual DMA pins A and B. As shown in the ta- 2. Write 57h (Jump to ROM) command to
ble, the byte 22 default is 0x10; therefore, CTRLbase+5.
DRQA/DACKA is the lower nibble which maps
to the ISA DMA channel 0. Likewise 3. Download the PnP Resource data.
DRQB/DACKB is the upper nibble which maps
to the ISA DMA channel 1. a. Send download command by writing AAh
to CTRLbase+5.
Byte 23 maps DMA C and IRQ G. The lower
nibble maps DMA C and defaults to DMA 3. b. Send starting download address (4000h)
The upper nibble supports a seventh IRQ, by writing low byte (00h) first, and then
IRQ G. The default is disabled (0), providing high byte (40h) to CTRLbase+5.
backwards compatibility with other Cirrus Audio
parts. If IRQ G is connected to an ISA interrupt c. Send the Hardware Configuration and re-
(typically 10), then this byte must be modified to source data in successive bytes to
reflect the hardware connection. CTRLbase+5. This includes the Hardware
Configuration and the PnP resource data.

24 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

The PnP resource format is described in the address to zero. Then another start bit and
the PnP Data section. The resource header device address, followed by all the data. Since
should not contain the first four bytes the part uses the sequential read properties of the
which are only used for E2PROM loads. E2PROM, only one E2PROM, is supported
(ganged E2PROMs are not supported).
d. End download by writing 00h to
CTRLbase+6. Some E2PROMs that are compatible with this
interface are:
4. Download Firmware data. Contact Cirrus Atmel AT24Cxx series
Logic for the BIOS kit which gives examples MicroChip 24LCxxB series
of how to download firmware. National NM24CxxL series
Ramtron FM24Cxx series
SGS Thompson ST24Cxx series
5. If any of the Hardware Configuration Data Xicor X24Cxx series
(first 19 bytes) has changed, 5Ah must be where the xx is replaced by 02, 04, 08, or 16
written to CTRLbase+5 to force the part to based on the size of the E2PROM desired. The
internally update this information. size of 08 (1k bytes) is preferred since it allows
the maximum flexibility for upgrading firmware
The new PnP data is loaded and the part is ready patches. Other E2PROMs compatible with Fig-
for the next PnP cycle. ure 3 and the timing parameters listed in the
front of the data sheet may also be used.
External E2PROM
The Plug and Play specification defines 32 bits The maximum Hardware Configuration and PnP
of the 72-bit Serial Identifier as being a user de- resource RAM data supported is 384 bytes, and
fined serial number. The E2PROM is used to a four byte header; therefore, the maximum
change the user section of the identifier, store amount of data storage, without firmware
default resource data for PnP, Hardware Con- patches, in E2PROM would be 388 bytes. The
figuration data specific to the CS4235, and maximum size E2PROM needed is 770 bytes, to
firmware patches to upgrade the core processor allow the inclusion of firmware patches after the
functionality. PnP resource data.

The E2PROM interface uses an industry standard If an external E2PROM exists, it is accessed by
2-wire interface consisting of a bi-directional the serial interface and is connected to the SDA
data line and a clock line driven from the part. and SCL pins. The two-wire interface is control-
After power-on the part looks for the existence led by three bits in the Control logical device,
of an E2PROM device and loads the user de- Hardware Control Register (CTRLbase+1). The
fined data. The existence is determined by the serial data can be written to or read from the
first two bytes read (0x55 followed by 0xBB). If E2PROM by sequentially writing or reading that
the first two bytes are correct, the part reads the register. The three register bits, D0, D1, D2 are
next two bytes to determine the length of data in labeled CLK, DOUT, and DIN/EEN respectively.
the E2PROM. The length bytes indicate the The DIN/EEN bit, when written to a one, en-
number of bytes left to be read (not including ables the E2PROM serial interface. When the
the two validation bytes or two length bytes). As DIN/EEN bit is written to a zero, the serial inter-
shown in Figure 3, the E2PROM is read using a face is disabled. The DIN/EEN bit is also the
start bit followed by a dummy write, to initialize Data In (DIN) signal to read back data from the
E2PROM. The SDA pin is a bi-directional open-

DS252PP2 25
TM
CS4235
CrystalClear Low Cost ISA Audio System

drain data line supporting DIN and DOUT; 2. Refer to the specific data sheet for the
therefore, to read the correct data, the DOUT bit E2PROM you are using for timing require-
must be set to a one prior to performing a read ments and data format. Also, refer to the
of the register. Otherwise, the data read back Loading Resource Data section of this data
from DIN/EEN will be all zeros. The E2PROM sheet for the E2PROM resource data format.
data can then be read from the DIN/EEN bit.
The CLK bit timing is controlled by the host 3. Send the E2PROM data in successive bits to
software. This is the serial clock for the CTRLbase+1 (Hardware Control Register)
E2PROM output on the SCL pin. The DOUT bit while following the E2PROM data sheet for-
is used to write/program the data out to the mat.
E2PROM. An external pull-up resistor is re-
quired on SDA because it is an open-drain The E2PROM now contains the PnP resource
output. Use the guidelines in the specific data. For this new data to take effect, the part
E2PROM data sheet to select the value of the must be reset, causing the part to read the
pull-up resistor (a typical value would be E2PROM during initialization. Cirrus can pro-
3.3 kΩ). vide a utility, RESOURCE.EXE, to program
E2PROMs through the Control logical device in-
Programming the E2PROM: terface.
1. Configure Control I/O base address by one
of two methods: regular PnP cycle or Crystal WINDOWS SOUND SYSTEM CODEC
Key method. The WSS Codec software interface consists of
4 I/O locations starting at the Plug and Play ad-
a. The host can use the regular PnP cycle to dress ’WSSbase’, and supports 12-bit address
program the logical device 2 I/O base ad- decoding. If the upper address bits, SA12-SA15
dress, and then place the chip in the are used, they must be 0 to decode a valid ad-
wait_for_key_state dress. The WSS Codec also requires one
interrupt and one or preferably two DMA chan-
b. If the Crystal Key method is used: nels, one for playback and one for capture. Since
the WSS Codec and Sound Blaster device are
First, write to the AP, send the 32-byte mutually exclusive, the two devices share the
Crystal key. same interrupt and DMA playback channel.
Second, configure the Control I/O base The WSS functions include stereo Analog-to-
address by writing 15h, 02h, 47h, 01h, Digital and Digital-to-Analog converters (ADCs
20h, 33h, 01h, 79h to the AP. and DACs), analog mixing, anti-aliasing and re-
construction filters, line and microphone level

Part Bank No
Part Read
Crystal IC Start Address Write Address Start Acknowledge Acknowledge
Address Stop
S 1 0 1 0 0 0 0 0 A 0 0 0 0 0 0 0 0 AS 1 0 1 0 0 0 0 1 A Data A Data 1P

EEPROM Acknowledge Data

Figure 3. EEPROM Format

26 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

inputs, simultaneous capture and playback (at in-


dependent sample frequencies) and a parallel bus FIFOs
interface. The WSS Codec contains 16-sample FIFOs in
both the playback and capture digital audio data
Enhanced Functions (MODEs) paths. The FIFOs are transparent and have no
The initial state is labeled MODE 1 and forces programming associated with them.
the part to appear as a CS4248. The more popu-
lar second mode, MODE 2, forces the part to When playback is enabled, the playback FIFO
appear as a CS4231 super set and is compatible continually requests data until the FIFO is full,
with the CS4232. To switch from MODE 1 to and then makes requests as positions inside the
MODE 2, the CMS1,0 bits, in the MODE and FIFO are emptied, thereby keeping the playback
ID register (I12), should be set to 10 respec- FIFO as full as possible. Thus when the system
tively. When MODE 2 is selected, the bit IA4 in cannot respond within a sample period, the FIFO
the Index Address register (R0) will be decoded starts to empty, avoiding a momentary loss of
as a valid index pointer providing 16 additional audio data. If the FIFO runs out of data, the last
registers and increased functionality over the valid sample can be continuously output to the
CS4248. DACs (if DACZ in I16 is clear) which will
eliminate pops from occurring.
To reverse the procedure, set the CMS1,0 bits to
00 and the part will resume operation in When capture is enabled, the capture FIFO tries
MODE 1. Except for the Capture Data Format to continually stay empty by making requests
(I28), Capture Base Count (I30/31), and Alter- every sample period. Thus when the system can-
nate Feature Status (I24) registers, all other not respond within a sample period, the capture
Mode 2 functions retain their values when re- FIFO starts filling, thereby avoiding a loss of
turning to Mode 1. data in the audio data stream.

MODE 3 is selected by setting CMS1,0 to 11. WSS Codec PIO Register Interface
MODE 3 allows access to a third set of "ex- Four I/O mapped locations are available for ac-
tended registers" which are designated X0-X31. cessing the Codec functions and mixer. The
The extended registers are accessed through I23. control registers allow access to status, audio
The additional MODE 3 functions are: data, and all indirect registers via the index reg-
isters. The IOR and IOW signals are used to
1. A full symmetrical mixer. This changes the in- define the read and write cycles respectively. A
put multiplexer to a input mixer. PIO access to the Codec begins when the host
puts an address on to the ISA bus which matches
2. Independent sample frequency control on the WSSbase and drives AEN low. WSSbase is pro-
ADCs and DACs. grammed during a Plug and Play configuration
sequence. Once a valid base address has been
3. Programmable Gain and Attenuation on the decoded then the assertion of IOR will cause the
Microphone inputs. WSS Codec to drive data on the ISA data bus
lines. Write cycles require the host to assert data
on the ISA data bus lines and strobe the IOW
signal. The WSS Codec will latch data into the
PIO register on the rising edge of the IOW
strobe.

DS252PP2 27
TM
CS4235
CrystalClear Low Cost ISA Audio System

The audio data interface typically uses DMA re- SDC mode) then both the playback and capture
quest/grant pins to transfer the digital audio data DMA requests should be routed to the same
between the WSS Codec and the bus. The WSS DRQ/DACK pair (DMA Channel Select 0). If
Codec is responsible for asserting a request sig- the Plug and Play resource data specifies two
nal whenever the Codec’s internal buffers need DMA channels for the Codec, then the playback
updating. The bus responds with an acknowledge DMA request will be routed to the DMA pair
signal and strobes data to and from the Codec, specified by the DMA Channel Select 0 resource
8 bits at a time. The WSS Codec keeps the re- data, and the capture DMA requests will be
quest pin active until the appropriate number of routed to the DMA pair specified by the DMA
8-bit cycles have occurred to transfer one audio Channel Select 1 resource data.
sample. Note that different audio data types will
require a different number of 8-bit transfers. DUAL DMA CHANNEL MODE
The WSS Codec supports a single and a dual
DMA Interface DMA channel mode. In dual DMA channel
The second type of parallel bus cycle from the mode, playback and capture DMA requests and
WSS Codec is a DMA transfer. DMA cycles are acknowledges occur on independent DMA chan-
distinguished from PIO register cycles by the as- nels. In dual DMA mode, SDC should be set to
sertion of a DRQ followed by an 0. The Playback- and Capture-Enables (PEN,
acknowledgment by the host by the assertion of CEN, I9) can be changed without a Mode
DACK (with AEN high). While the acknow- Change Enable (MCE, R0). This allows for
ledgment is received from the host, the WSS proper full duplex control where applications are
Codec assumes that any cycles occurring are independently using playback and capture.
DMA cycles and ignores the addresses on the
address lines. SINGLE DMA CHANNEL (SDC) MODE
When two DMA channels are not available, the
The WSS Codec may assert the DMA request SDC mode forces all DMA transfers (capture or
signal at any time. Once asserted, the DMA re- playback) to occur on a single DMA channel
quest will remain asserted until a complete DMA (playback channel). The trade-off is that the
cycle occurs to the part. DMA transfers may be WSS Codec will no longer be able to perform
terminated by resetting the PEN and/or CEN bits simultaneous DMA capture and playback.
in the Interface Configuration register (I9), de-
pending on the DMA that is in progress To enable the SDC mode, set the SDC bit in the
(playback, capture, or both). Termination of Interface Configuration register (I9). With the
DMA transfers may only happen between sample SDC bit asserted, the internal workings of the
transfers on the bus. If DRQ goes active while WSS Codec remain exactly the same as dual
resetting PEN and/or CEN, the request must be mode, except for the manner in which DMA re-
acknowledged with DACK and a final sample quest and acknowledges are handled.
transfer completed.
The playback of audio data will occur on the
DMA CHANNEL MAPPING playback channel exactly as dual channel opera-
Mapping of the WSS Codec’s DRQ and DACK tion; however, the capture audio channel is now
onto the ISA bus is accomplished by the Plug diverted to the playback channel. Alternatively
and Play configuration registers. If the Plug and stated, the capture DMA request occurs on DMA
Play resource data specifies only one DMA channel select 0 for the WSS Codec. (In
channel for the Codec (or the codec is placed in MODEs 2 and 3, the capture data format is al-

28 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

ways set in register I28.) If both playback and Direct Registers: (R0-R3)
capture are enabled, the default will be playback.
SDC does not have any affect when using PIO Address Reg. Register Name
accesses. WSSbase+0 R0 Index Address register
WSSbase+1 R1 Indexed Data register
Sound System Codec Register Interface WSSbase+2 R2 Status register
The Windows Sound System codec is mapped WSSbase+3 R3 PIO Data register
via four locations. The I/O base address,
WSSbase, is determined by the Plug and Play Table 3. WSS Codec Direct Register
configuration. The WSSbase supports four direct
registers, shown in Table 3. The first two direct Index Register Name
registers are used to access 32 indirect registers I0 Left Analog Loopback
shown in Table 4. The Index Address register I1 Right Analog Loopback
(WSSbase+0) points to the indirect register that I2 Left Aux #1 Volume
is accessed through the Indexed Data register I3 Right Aux #1 Volume
(WSSbase+1). I4 Left Aux #2 Volume
I5 Right Aux #2 Volume
This section describes all the direct and indirect I6 Left DAC1 Volume
registers for the WSS Codec. Table 5 details a I7 Right DAC1 Volume
summary of each bit in each register with Ta- I8 Fs & Playback Data Format
bles 6 through 10 illustrating the majority of I9 Interface Configuration
I10 Pin Control
decoding needed when programming the WSS
I11 Error Status and Initialization
logical device, and are included for reference.
I12 MODE and ID
When enabled, the WSS Codec default state is
I13 Reserved
defined as MODE 1. MODE 1 is backwards
I14 Playback Upper Base Count
compatible with the CS4248 and only allows ac- I15 Playback Lower Base Count
cess to the first 16 indirect registers. Putting the I16 Alternate Feature Enable I
part in MODE 2 or MODE 3, using CMS1,0 bits I17 Alternate Feature Enable II
in the MODE and ID register (I12), allows ac- I18 Left DAC2 Volume
cess to indirect registers 16 through 31. Putting I19 Right DAC2 Volume
the part in MODE 3 also allows access to the I20 Control/RAM Access
extended registers through I23 and other ex- I21 RAM Access End
tended features in the indirect registers. I22 Alternate Sample Frequency
I23 Extended Register Access (X regs)
I24 Alternate Feature Status
I25 Compatibility ID
I26 Mono Input Control
I27 Left Master Output Volume
I28 Capture Data Format
I29 Right Master Output Volume
I30 Capture Upper Base Count
I31 Capture Lower Base Count

Table 4. WSS Codec Indirect Registers

DS252PP2 29
TM
CS4235
CrystalClear Low Cost ISA Audio System

TRD Transfer Request Disable: This bit,


DIRECT MAPPED REGISTERS when set, causes DMA transfers to
cease when the INT bit of the Status
The first two WSS Codec registers provide indi- Register (R2) is set. Independent for
rect accessing to more codec registers via an playback and capture interrupts.
index register. The other two registers provide
status information and allow audio data to be 0 - Transfers Enabled (playback and
capture DRQs occur uninhibited)
transferred to and from the WSS Codec without 1 - Transfers Disabled (playback and
using DMA cycles or indexing. capture DRQ only occur if INT bit
is 0)
Note that register defaults are listed in binary
form with reserved bits marked with ’x’ to indi- MCE Mode Change Enable: This bit must
be set whenever the current mode
cate unknown. Bits in the default marked with of the WSS Codec is changed. The
an ’e’ indicate that the bit is initialized through Data Format (I8, I28) and Interface
E2PROM. To maintain compatibility with future Configuration (I9) registers CANNOT
parts, these reserved bits must be written as 0, be changed unless this bit is set.
and must be masked off when the register is The exceptions are CEN and PEN
which can be changed "on-the-fly".
read. The current value read for reserved bits is
The DAC output is muted when
not guaranteed on future revisions. While the re- MCE is set.
served bits are listed as "res" in the bit position,
"rbc" is used for "reserved, backwards compat- INIT WSS Codec Initialization: This bit is
ible" for bits that were used on previous chips, read as 1 when the Codec is in a
but are no longer required on this chip. These state in which it cannot respond to
parallel interface cycles. This bit is
bits are read/writable but should generally be set read-only.
to 0 for backwards compatibility. Immediately after RESET (and once the WSS
Codec has left the INIT state), the state of this
Index Address Register register is: 010x0000 (binary - where ’x’ indi-
(WSSbase+0, R0) cates unknown).
D7 D6 D5 D4 D3 D2 D1 D0
INIT MCE TRD IA4 IA3 IA2 IA1 IA0 During initialization and software power down
(PDWN in CTRLbase+7), this register cannot be
IA3-IA0 Index Address: These bits define the written and always reads 10000000 (80h)
address of the indirect register ac-
cessed by the Indexed Data register
(R1). These bits are read/write. Indexed Data Register
(WSSbase+1, R1)
IA4 Allows access to indirect registers 16
D7 D6 D5 D4 D3 D2 D1 D0
- 31. In MODE 1, this bit is re-
ID7 ID6 ID5 ID4 ID3 ID2 ID1 ID0
served and must be written as zero.
ID7-ID0 Indexed Data register: These bits are
the indirect register referenced by
the Indexed Address register (R0).

30 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

be determined. However, the Alter-


nate Feature Status register (I24)
Status Register indicates the exact source of error.
(WSSbase+2, R2, Read Only)
D7 D6 D5 D4 D3 D2 D1 D0 CRDY Capture Data Ready. The Capture
CU/L CL/R CRDY SER PU/L PL/R PRDY INT Data register (R3) contains data
ready for reading by the host. This
INT Interrupt Status: This indicates the bit would be used for direct pro-
status of the internal interrupt logic grammed I/O data transfers.
of the WSS Codec. This bit is
cleared by any write of any value to 0 - Data is stale. Do not reread the
this register. The IEN bit of the Pin information.
Control register (I10) determines 1 - Data is fresh. Ready for next
whether the state of this bit is re- host data read.
flected on the IRQ pin assigned to
the WSS Codec. CL/R Capture Left/Right Sample: This bit
indicates whether the capture data
Read States waiting is for the Left channel or
Right channel.
0 - Interrupt inactive
1 - Interrupt active 0 - Right
1 - Left or Mono
PRDY Playback Data Ready. The Playback
Data register (R3) is ready for more CU/L Capture Upper/Lower Byte: This bit
data. This bit would be used when di- indicates whether the capture data
rect programmed I/O data transfers ready is for the upper or lower byte
are desired. of the channel.

0 - Data still valid. Do not overwrite. 0 - Lower available


1 - Data stale. Ready for next host 1 - Upper or 8-bit available
data write value.
Note on PRDY/CRDY: These two bits are de-
PL/R Playback Left/Right Sample: This bit signed to be read as one when action is required
indicates whether data needed is for by the host. For example, when PRDY is set to
the Left channel or Right channel. one, the device is ready for more data; or when
the CRDY is set to one, data is available to the
0 - Right needed
1 - Left or Mono needed host. The definition of the CRDY and PRDY bits
are therefore consistent in this regard.
PU/L Playback Upper/Lower Byte: This bit
indicates whether the playback data I/O DATA REGISTERS
needed is for the upper or lower
byte of the channel. The PIO Data register is two registers mapped to
the same address. Writes to this register sends
0 - Lower needed data to the Playback Data register. Reads from
1 - Upper or 8-bit needed this register will receive data from the Capture
Data register.
SER Sample Error: This bit indicates that a
sample was not serviced in time and
an error has occurred. The bit indi-
cates an overrun for capture and
underrun for playback. If both the
capture and playback are enabled,
the source which set this bit can not

DS252PP2 31
TM
CS4235
CrystalClear Low Cost ISA Audio System

Capture I/O Data Register INDIRECT MAPPED REGISTERS


(WSSbase+3, R3, Read Only) These registers are accessed by placing the ap-
D7 D6 D5 D4 D3 D2 D1 D0 propriate index in the Index Address register
CD7 CD6 CD5 CD4 CD3 CD2 CD1 CD0 (R0) and then accessing the Indexed Data regis-
ter (R1). A detailed description of each indirect
CD7-CD0 Capture Data Port. This is the control register is given below. All reserved bits should
register where capture data is read be written zero and may be 0 or 1 when read.
during programmed I/O data trans-
fers. Note that indirect registers 16-31 are not avail-
able when in MODE 1 (CMS1,0 in MODE and
The reading of this register will increment the ID register I12 are both zero).
state machine so that the following read will be
from the next appropriate byte in the sample. Left Analog Loopback (I0)
The exact byte which is next to be read can be Default = 000xxxxx
determined by reading the Status register (R2). D7 D6 D5 D4 D3 D2 D1 D0
Once all relevant bytes have been read, the state LSS1 LSS0 MGE res rbc rbc rbc rbc
machine will point to the last byte of the sample
until a new sample is received from the ADCs. MGE This bit controls the 20 dB gain boost
Once the Status register (R2) is read and a new for the MIC analog input.
sample is received from the FIFO, the state ma-
LSS1-LSS0 Left output loopback. Setting these
chine and Status register (R2) will point to the bits to 11 enables the left output
first byte of the new sample. loopback into the input mixer. Bit
combinations of 01, 10, and 00 dis-
During initialization and software power down able the loopback.
of the WSS Codec, this register can NOT be
written and is always read 10000000 (80h) Right Analog Loopback(I1)
Default = 000xxxxx
Playback I/O Data Register D7 D6 D5 D4 D3 D2 D1 D0
RSS1 RSS0 MGE res rbc rbc rbc rbc
WSSbase+3, R3, Write Only)
D7 D6 D5 D4 D3 D2 D1 D0
MGE This bit is identical to the MGE bit in
PD7 PD6 PD5 PD4 PD3 PD2 PD1 PD0
I0. It controls the 20 dB gain boost
for the MIC analog input.
PD7-PD0 Playback Data Port. This is the
control register where playback data
RSS1-RSS0 Right output loopback. Setting these
is written during programmed IO
bits to 11 enables the right output
data transfers.
loopback into the input mixer. Other
bit combinations disable the loop-
Writing data to this register will increment the back.
playback byte tracking state machine so that the
following write will be to the correct byte of the
sample. Once all bytes of a sample have been
written, subsequent byte writes to this port are
ignored. The state machine is reset after the
Status register (R2) is read, and the current sam-
ple is sent to the DACs via the FIFOs.

32 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

Left Auxiliary #1 Volume (I2) Left Auxiliary #2 Volume (I4)


Default = 11x00000 Default = 11x00000
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
LX1OM LX1IM rbc LX1G4 LX1G3 LX1G2 LX1G1 LX1G0 LX2OM LX2IM res LX2G4 LX2G3 LX2G2 LX2G1 LX2G0

Note: Although this register generally controls the vol- LX2G4-LX2G0 Left Auxiliary #2, LAUX2, Mix Gain.
ume for LAUX1, the LAUX1 volume can be controlled The least significant bit represents
through I18 by setting AUX1R in X18. 1.5 dB, with 01000 = 0 dB.
See Table 8.
LX1G4-LX1G0 Left Auxiliary #1, LAUX1, Mix Gain.
The least significant bit represents LX2IM Left Auxiliary #2 Mute. When set to 1,
1.5 dB, with 01000 = 0 dB. the left Auxiliary #2 input, LAUX2, to
See Table 8. the input mixer is muted.

LX1IM Left Auxiliary #1 Mute. When set, the LX2OM Left Auxiliary #2 Mute. When set to 1,
left Auxiliary #1 input, LAUX1, to the the left Auxiliary #2 input, LAUX2, to
input mixer is muted. the output mixer is muted.

LX1OM Left Auxiliary #1 Mute. When set to 1,


the left Auxiliary #1 input, LAUX1, to Right Auxiliary #2 Volume (I5)
the output mixer is muted. Default = 11x00000
D7 D6 D5 D4 D3 D2 D1 D0
Right Auxiliary #1 Volume (I3) RX2OM RX2IM res RX2G4 RX2G3 RX2G2 RX2G1 RX2G0

Default = 11x00000 RX2G4-RX2G0 Right Auxiliary #2, RAUX2, Mix Gain.


D7 D6 D5 D4 D3 D2 D1 D0 The least significant bit represents
RX1OM RX1IM rbc RX1G4 RX1G3 RX1G2 RX1G1 RX1G0
1.5 dB, with 01000 = 0 dB.
See Table 8.
Note: Although this register generally controls the
volume for RAUX1, the RAUX1 volume can be con- RX2IM Right Auxiliary #2 Mute. When set, the
trolled through I19 by setting AUX1R in X18. right Auxiliary #2 input, RAUX2, to
the input mixer is muted.
RX1G4-RX1G0 Right Auxiliary #1, RAUX1, Mix Gain.
The least significant bit represents RX2OM Right Auxiliary #2 Mute. When set,
1.5 dB, with 01000 = 0 dB. the right Auxiliary #2 input, RAUX2,
See Table 8. to the output mixer is muted.
RX1IM Right Auxiliary #1 Mute. When set to
1, the right Auxiliary #1 input, Left DAC1 Volume (I6)
RAUX1, to the input mixer is muted.
Default = 10000111
D7 D6 D5 D4 D3 D2 D1 D0
RX1OM Right Auxiliary #1 Mute. When set to 1,
LD1OM res LD1A5 LD1A4 LD1A3 LD1A2 LD1A1 LD1A0
the right Auxiliary #1 input, RAUX1,
to the output mixer is muted.
LD1A5-LD1A0 Left DAC1 Attenuation. The least
significant bit represents -1.5 dB,
with 000000 = 0 dB. The total range
is 0 to -94.5 dB. See Table 6.

LD1OM Left DAC1 Output Mute. When set,


the left DAC1 to the output mixer is
muted.

DS252PP2 33
TM
CS4235
CrystalClear Low Cost ISA Audio System

Direct Registers: WSSbase (R0-R3)


ADDRESS D7 D6 D5 D4 D3 D2 D1 D0
WSSbase+0 R0 INIT MCE TRD IA4 IA3 IA2 IA1 IA0
WSSbase+1 R1 ID7 ID6 ID5 ID4 ID3 ID2 ID1 ID0
WSSbase+2 R2 CU/L CL/R CRDY SER PU/L PL/R PRDY INT
WSSbase+3 R3 CD7/PD7 CD6/PD6 CD5/PD5 CD4/PD4 CD3/PD3 CD2/PD2 CD1/PD1 CD0/PD0

Indirect Registers: (I0-I31)


IA4-IA0 D7 D6 D5 D4 D3 D2 D1 D0
0 LSS1 LSS0 MGE - - - - -
1 RSS1 RSS0 MGE - - - - -
2 LX1OM LX1IM - LX1G4 LX1G3 LX1G2 LX1G1 LX1G0
3 RX1OM RX1IM - RX1G4 RX1G3 RX1G2 RX1G1 RX1G0
4 LX2OM LX2IM - LX2G4 LX2G3 LX2G2 LX2G1 LX2G0
5 RX2OM RX2IM - RX2G4 RX2G3 RX2G2 RX2G1 RX2G0
6 LD1OM - LD1A5 LD1A4 LD1A3 LD1A2 LD1A1 LD1A0
7 RD1OM - RD1A5 RD1A4 RD1A3 RD1A2 RD1A1 RD1A0
8§ - 16B - S/M CFS2 CFS1 CFS0 C2SL
9§ CPIO PPIO - CAL1 CAL0 SDC CEN PEN
10 XCTL1 XCTL0 OSM1 OSM0 DEN DTM IEN -
11 COR PUR ACI DRS ORR1 ORR0 ORL1 ORL0
12 1 CMS1 CMS0 - 1 0 1 0
13 - - - - - - - -
14 PUB7 PUB6 PUB5 PUB4 PUB3 PUB2 PUB1 PUB0
15 PLB7 PLB6 PLB5 PLB4 PLB3 PLB2 PLB1 PLB0
16 - - CMCE PMCE SF1 SF0 SPE DACZ
17 TEST TEST TEST TEST - - - HPF
18 LD2OM LD2IM - LD2A4 LD2A3 LD2A2 LD2A1 LD2A0
19 RD2OM RD2IM - RD2A4 RD2A3 RD2A2 RD2A1 RD2A0
20 CR7 CR6 CR5 CR4 CR3 CR2 CR1 CR0
21 RE7 RE6 RE5 RE4 RE3 RE2 RE1 RE0
22 SRE DIV5 DIV4 DIV3 DIV2 DIV1 DIV0 CS2
23 XA3 XA2 XA1 XA0 XRAE XA4 - -
24 - - CI PI CU CO PO PU
25 0 0 0 0 0 0 1 1
26 MIM - - - MIA3 MIA2 MIA1 MIA0
27 LOM LOS1 LOS0 LOG4 LOG3 LOG2 LOG1 LOG0
28 - 16B - S/M - - - -
29 ROM ROS1 ROS0 ROG4 ROG3 ROG2 ROG1 ROG0
30 CUB7 CUB6 CUB5 CUB4 CUB3 CUB2 CUB1 CUB0
31 CLB7 CLB6 CLB5 CLB4 CLB3 CLB2 CLB1 CLB0

Table 5. WSS Codec Direct & Indirect Register Bits

34 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

A5 A4 A3 A2 A1 A0 Level G4 G3 G2 G1 G0 Master MIC


0 0 0 0 0 0 0 0.0 dB 0 0 0 0 0 0 6 dB 22.5 dB
1 0 0 0 0 0 1 -1.5 dB
1 0 0 0 0 1 4 dB 21.0 dB
2 0 0 0 0 1 0 -3.0 dB
3 0 0 0 0 1 1 -4.5 dB 2 0 0 0 1 0 2 dB 19.5 dB
. . . . . . . . 3 0 0 0 1 1 0 dB 18.0 dB
8 0 0 1 0 0 0 -12.0 dB 4 0 0 1 0 0 -2 dB 16.5 dB
. . . . . . . . . . . . . . . .
. . . . . . . .
12 0 1 1 0 0 -18 dB 4.5 dB
60 1 1 1 1 0 0 -90.0 dB
61 1 1 1 1 0 1 -91.5 dB 13 0 1 1 0 1 -20 dB 3.0 dB
62 1 1 1 1 1 0 -93.0 dB 14 0 1 1 1 0 -22 dB 1.5 dB
63 1 1 1 1 1 1 -94.5 dB 15 0 1 1 1 1 -24 dB 0 dB
. . . . . . . .
28 1 1 1 0 0 -50 dB -19.5 dB
Table 6. DAC1 29 1 1 1 0 1 -52 dB -21.0 dB
30 1 1 1 1 0 -54 dB -22.5 dB
31 1 1 1 1 1 -56 dB muted
CFS
2 1 0 C2SL = 0 C2SL=1 Note: Master Volume is also affected by L/RS1, L/RS0
0 0 0 8.0 kHz 5.51 kHz Mic Volume assumes that Boost is off (MBST=0).
0 0 1 16.0 kHz 11.025 kHz Table 9. Master and Microphone Volume
0 1 0 27.42 kHz 18.9 kHz
0 1 1 32.0 kHz 22.05 kHz Decimal ADC Fs ADC DAC Fs DAC
1 0 0 N/A 37.8 kHz Value (kHz) Divider (kHz) Divider
1 0 1 N/A 44.1 kHz 0 50.40 16 X 21 50.40 16 X 21
1 1 0 48.0 kHz 33.075 kHz 1 48.00 353 48.00 353
1 1 1 9.6 kHz 6.62 kHz 2 32.00 529 32.00 529
3 27.42 617 27.42 617
Table 7. I8 Sample Frequency Selection 4 16.00 1058 16.00 1058
5 9.600 1764 9.600 1764
6 8.000 2117 8.000 2117
G4 G3 G2 G1 G0 Level
0 0 0 0 0 0 12.0 dB 7 6.620 2558 6.620 2558
1 0 0 0 0 1 10.5 dB 8 50.40 16 X 21 50.40 16 X 21
2 0 0 0 1 0 9.0 dB
. . . . .
3 0 0 0 1 1 7.5 dB
4 0 0 1 0 0 6.0 dB 21 50.40 16 X 21 50.40 16 X 21
5 0 0 1 0 1 4.5 dB 16 X 22 16 X 22
22 48.10 48.10
6 0 0 1 1 0 3.0 dB
7 0 0 1 1 1 1.5 dB 23 46.01 16 X 23 46.01 16 X 23
8 0 1 0 0 0 0.0 dB 24 44.10 16 X 24 44.10 16 X 24
9 0 1 0 0 1 -1.5 dB 16 X 25 16 X 25
10 0 1 0 1 0 -3.0 dB 25 42.36 42.36
11 0 1 0 1 1 -4.5 dB 26 40.70 16 X 26 40.70 16 X 26
12 0 1 1 0 0 -6.0 dB . . . . .
. . . . . . .
189 5.600 16 X 189 5.600 16 X 189
. . . . . . .
. . . . . . . 190 5.570 16 X 190 5.570 16 X 190
24 1 1 0 0 0 -24.0 dB 16 X 191 16 X 191
25 1 1 0 0 1 -25.5 dB
191 5.541 5.541
26 1 1 0 1 0 -27.0 dB 192 5.512 16 X 192 5.512 16 X 192
27 1 1 0 1 1 -28.5 dB 193 5.512 16 X 192 5.483 16 X 193
28 1 1 1 0 0 -30.0 dB
194 5.512 16 X 192 5.455 16 X 194
29 1 1 1 0 1 -31.5 dB
30 1 1 1 1 0 -33.0 dB . . . . .
31 1 1 1 1 1 muted 16 X 192 16 X 255
255 5.512 4.150

Table 8. AUX1, AUX2, DAC2 Table 10. X12/13 Sample Frequency Selection

DS252PP2 35
TM
CS4235
CrystalClear Low Cost ISA Audio System

S/M Stereo/Mono Select: This bit deter-


mines how the audio data streams
Right DAC1 Volume (I7)
are formatted. Selecting stereo will
Default = 10000111 result in alternating samples repre-
D7 D6 D5 D4 D3 D2 D1 D0 senting left and right audio channels.
RD1OM res RD1A5 RD1A4 RD1A3 RD1A2 RD1A1 RD1A0 Mono playback plays the same
audio sample on both channels.
RD1A5-RD1A0 Right DAC1 Attenuation. The least Mono capture only captures data
significant bit represents -1.5 dB, from the left channel. In MODE 1,
with 000000 = 0 dB. The total range this bit is used for both playback and
is 0 to -94.5 dB. See Table 6. capture. In MODEs 2 and 3, this bit
is only used for playback, and the
RD1OM Right DAC1 Mute. When set, the capture format is independently se-
lected via I28. MCE (R0) or PMCE
right DAC1 to the output mixer is
muted. (I16) must be set to modify S/M.
See Changing Audio Data Formats
section for more details.
Fs and Playback Data Format (I8)
0 - Mono
Default = 00000000
1 - Stereo
D7 D6 D5 D4 D3 D2 D1 D0
rbc 16B rbc S/M CFS2 CFS1 CFS0 C2SL

16B selects between 8-bit unsigned and


C2SL Clock 2 Source Select: This bit selects 16-bit signed data for playback. The
the clock base used for the audio capture format is independently se-
sample rates for both capture and lected via register I28. MCE (R0) or
playback. Note that this bit can be PMCE (I16) must be set to modify
disabled by setting SRE in I22 or by the upper four bits of this register.
setting IFSE in X11. See Changing Audio Data Formats
CAUTION: C2SL can only be section for more details.
changed while MCE (R0) is set.
0 - 8-bit unsigned data
CFS2-CFS0 Clock Frequency Divide Select: These 1 - 16-bit signed data
bits select the audio sample fre-
quency for both capture and
playback. The actual audio sample Interface Configuration (I9)
frequency depends on which clock Default = 00x00100
base (C2SL) is selected. Note that D7 D6 D5 D4 D3 D2 D1 D0
these bits can be disabled by setting CPIO PPIO res CAL1 CAL0 SDC CEN PEN
SRE in I22 or IFSE in X11.
CAUTION: CFS2-CFS0 can only be
changed while MCE (R0) is set. PEN Playback Enable. This bit enables
playback. The WSS Codec will
generate a DRQ and respond to
DIVIDE C2SL = 0 C2SL = 1 DACK signal when this bit is en-
0 - 3072 8.0 kHz 5.51 kHz abled and PPIO=0. If PPIO=1, PEN
1 - 1536 16.0 kHz 11.025 kHz enables PIO playback mode. PEN
2 - 896 27.42 kHz 18.9 kHz may be set and reset without setting
3 - 768 32.0 kHz 22.05 kHz the MCE bit.
4 - 448 N/A 37.8 kHz
0 - Playback Disabled (playback DRQ
5 - 384 N/A 44.1 kHz and PIO inactive)
6 - 512 48.0 kHz 33.075 kHz 1 - Playback Enabled
7 - 2560 9.6 kHz 6.62 kHz

36 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

CEN Capture Enabled. This bit enables the Caution: This register, except bits CEN and
capture of data. The WSS Codec PEN, can only be written while in Mode Change
will generate a DRQ and respond to
Enable (either MCE or PMCE). See the Chang-
DACK signal when CEN is enabled
and CPIO=0. If CPIO=1, CEN en- ing Sampling Rate section for more details.
ables PIO capture mode. CEN may
be set and reset without setting the Pin Control (I10)
MCE bit.
Default = 0000000x
0 - Capture Disabled (capture DRQ D7 D6 D5 D4 D3 D2 D1 D0
and PIO inactive) XCTL1 XCTL0 OSM1 OSM0 DEN DTM IEN res
1 - Capture Enabled
IEN Interrupt Enable: This bit enables the
SDC Single DMA Channel: This bit will interrupt pin. The Interrupt pin will re-
force BOTH capture and playback flect the value of the INT bit of the
DMA requests to occur on the Play- Status register (R2). The interrupt
back DMA channel. This bit forces pin is active high.
the WSS Codec to use one DMA
channel. Should both capture and 0 - Interrupt disabled
playback be enabled in this mode, 1 - Interrupt enabled
only the playback will occur. See the
DMA Interface section for further ex- DTM DMA Timing Mode. MODE 2 & 3 only.
planation. When set, causes the current DMA
request signal to be deasserted on
0 - Dual DMA channel mode the rising edge of the IOW or IOR
1 - Single DMA channel mode strobe during the next to last byte of
a DMA transfer. When DTM = 0 the
CAL1,0 Calibration: These bits determine DMA request is released on the fall-
which type of calibration the WSS ing edge of the IOW or IOR during
Codec performs whenever the Mode the last byte of a DMA transfer.
Change Enable (MCE) bit, R0,
changes from 1 to 0. The number of DEN Dither Enable: When set, triangular
sample periods required for calibra- pdf dither is added before truncating
tion is listed in parenthesis. the ADC 16-bit value to 8-bit, un-
signed data. Dither is only active in
0 - No calibration (0) the 8-bit unsigned data mode.
1 - Converter calibration (321)
2 - DAC calibration (120) 0 - Dither enabled
3 - Full calibration (450) 1 - Dither disabled

PPIO Playback PIO Enable: This bit deter- OSM1-OSM0 These bits are enabled by setting
mines whether the playback data is SRE = 1 in I22. These bits in com-
transferred via DMA or PIO. bination with DIV5-DIV0 and CS2
(I22) determine the current sample
0 - DMA transfers rate of the WSS Codec when
1 - PIO transfers SRE = 1. Note that these bits can
be disabled by setting IFSE in X11.
CPIO Capture PIO Enable: This bit deter-
mines whether the capture data is 00 - 12 kHz < Fs ≤ 24 kHz
transferred via DMA or PIO. 01 - Fs > 24 kHz
10 - Fs ≤ 12 kHz
0 - DMA transfers 11 - reserved
1 - PIO transfers

DS252PP2 37
TM
CS4235
CrystalClear Low Cost ISA Audio System

XCTL1-XCTL0 XCTL Control: These bits are reflected PUR Playback underrun: This bit is set
on the XCTL1,0 pins of the part. when playback data has not arrived
NOTE: XCTL1 is multiplexed with from the host in time to be played.
other functions; therefore, it may not As a result, if DACZ = 0, the last
be available on a particular design. valid sample will be sent to the
DACs. This bit is set when an error
0 - TTL logic low on XCTL1,0 pins occurs and will not clear until the
1 - TTL logic high on XCTL1,0 pins Status register (R2) is read.

COR Capture overrun: This bit is set when


Error Status and Initialization (I11, Read Only) the capture data has not been read
Default = 00000000 by the host before the next sample
D7 D6 D5 D4 D3 D2 D1 D0 arrives. The old sample will not be
COR PUR ACI DRS ORR1 ORR0 ORL1 ORL0 overwritten and the new sample will
be ignored. This bit is set when an
ORL1-ORL0 Overrange Left Detect: These bits error condition occurs and will not
determine the overrange on the left clear until the Status register (R2) is
ADC channel. These bits are up- read.
dated on a sample by sample basis.
The SER bit in the Status register (R2) is simply
0 - Less than -1.5 dB a logical OR of the COR and PUR bits. This
1 - Between -1.5 dB and 0 dB enables a polling host CPU to detect an error
2 - Between 0 dB and 1.5 dB condition while checking other status bits.
overrange
3 - Greater than 1.5 dB overrange
MODE and ID (I12)
ORR1-ORR0 Overrange Right Detect: These bits Default = 100x1010
determine the overrange on the D7 D6 D5 D4 D3 D2 D1 D0
Right ADC channel. 1 CMS1 CMS0 res 1 0 1 0

0 - Less than -1.5 dB


res Reserved. Must write 0. Could read
1 - Between -1.5 dB and 0 dB
as 0 or 1.
2 - Between 0 dB and 1.5 dB
overrange
3 - Greater than 1.5 dB overrange CMS1,0 Codec Mode Select bits: Enables the
Extended registers and functions of
the part.
DRS DRQ Status: This bit indicates the
current status of the DRQs assigned
00 - MODE 1
to the WSS Codec.
01 - Reserved
10 - MODE 2
0 - Capture AND Playback DRQs are
11 - MODE 3
presently inactive
1 - Capture OR Playback DRQs are
presently active Reserved (I13)
Default = xxxxxxxx
ACI Auto-calibrate In-Progress: This bit
indicates the state of calibration. D7 D6 D5 D4 D3 D2 D1 D0
rbc rbc rbc rbc rbc rbc res rbc

0 - Calibration not in progress


1 - Calibration is in progress rbc Reserved, backwards compatible.

res Reserved. Must write 0. Could read


as 0 or 1.

38 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

from SDIN is sent to the DACs.


MCE in R0 must be set to change
Playback Upper Base (I14) this bit. This bit is initialized through
Default = 00000000 the Hardware Configuration data.
D7 D6 D5 D4 D3 D2 D1 D0
PUB7 PUB6 PUB5 PUB4 PUB3 PUB2 PUB1 PUB0 1 - Enable serial port
0 - Disable serial port.
PUB7-PUB0 Playback Upper Base: This register is
the upper byte which represents the SF1,SF0 DSP Serial Format. Selects the
8 most significant bits of the 16-bit format of the serial port when en-
Playback Base register. Reads from abled by SPE. MCE in R0 must be
this register return the same value set to change these bits. These bits
which was written. The Current are initialized through the Hardware
Count registers cannot be read. Configuration data.
When set for MODE 1 or SDC, this
register is used for both the Play- 0 - 64-bit enhanced. Figure 6.
back and Capture Base registers. 1 - 64-bit. Figure 7.
2 - 32-bit. Figure 8.
3 - ADC/DAC. Figure 9.
Playback Lower Base (I15)
Default = 00000000 PMCE Playback Mode Change Enable.
When set, it allows modification of
D7 D6 D5 D4 D3 D2 D1 D0
the stereo/mono and audio data for-
PLB7 PLB6 PLB5 PLB4 PLB3 PLB2 PLB1 PLB0
mat bits (D7-D4) for the playback
channel, I8. MCE in R0 must be
PLB7-PLB0 Lower Base Bits: This register is the used to change the sample fre-
lower byte which represents the 8 quency.
least significant bits of the 16-bit
Playback Base register. Reads from CMCE Capture Mode Change Enable.
this register return the same value When set, it allows modification of
which was written. When set for the stereo/mono and audio data for-
MODE 1 or SDC, this register is mat bits (D7-D4) for the capture
used for both the Playback and Cap- channel, I28. MCE in R0 must be
ture Base registers. used to change the sample fre-
quency in I8.
Alternate Feature Enable I (I16)
Default = 0000eee0 Alternate Feature Enable II (I17)
D7 D6 D5 D4 D3 D2 D1 D0 Default = 0000x000
rbc res CMCE PMCE SF1 SF0 SPE DACZ D7 D6 D5 D4 D3 D2 D1 D0
TEST TEST TEST TEST rbc res rbc HPF
DACZ DAC Zero: This bit will force the out-
put of the playback channel to AC
HPF High Pass Filter: This bit enables a
zero when an underrun error occurs
DC-blocking high-pass filter in the
digital filter of the ADC. This filter
1 - Go to center scale
forces the ADC offset to 0.
0 - Hold previous valid sample
0 - disabled
SPE DSP Serial Port Enable. When
1 - enabled
set, audio data from the ADCs is
sent out SDOUT and audio data
TEST Factory Test. These bits are used for
factory testing and must remain at 0
for normal operation.

DS252PP2 39
TM
CS4235
CrystalClear Low Cost ISA Audio System

Left DAC2 Volume (I18) Control/RAM Access (I20)


Default = 00000111 Default = xxxxxxxx
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
LD2OM LD2IM rbc LD2A4 LD2A3 LD2A2 LD2A1 LD2A0 CR7 CR6 CR5 CR4 CR3 CR2 CR1 CR0

Note: When AUX1R in X18 is set, this register also This register is identical to CTRLbase+5. For back-
controls the volume for the LAUX1 analog input. See wards compatibility, this register is not enabled until
I2 description for volume description of LAUX1. PAE in X18 is set. When PAE is clear, this register is
read/writable, but does nothing.
LD2A4-LD2A0 Left DAC2 Attenuation. The least sig-
nificant bit represents 1.5 dB, with CR7-CR0 This register controls the loading of
01000 = 0 dB. The total range is the part’s internal RAM as well as in-
+12 dB to -33.0 dB with ternal processor commands. See the
11111 = muted. See Table 8. Hostload Procedure section as well
as CTRLbase+5 register description
LD2IM Left DAC2 Input Mute. When set, for more details.
the left DAC2 to the input mixer is
muted.
RAM Access End (I21)
LD2OM Left DAC2 Output Mute. When set, Default = xxxxxxxx
the left DAC2 to the output mixer is D7 D6 D5 D4 D3 D2 D1 D0
muted. RE7 RE6 RE5 RE4 RE3 RE2 RE1 RE0

Right DAC2 Volume (I19) This register is identical to CTRLbase+6. For back-
wards compatibility, this register is not enabled until
Default = 00000111 PAE in X18 is set. When PAE is clear, this register is
D7 D6 D5 D4 D3 D2 D1 D0 read/writable, but does nothing.
RD2OM RD2IM rbc RD2A4 RD2A3 RD2A2 RD2A1 RD2A0
RE7-RE0 A 0 written to this location resets the
Note: When AUX1R in X18 is set, this register also previous location, I20, from data
controls the volume for the RAUX1 analog input. See download mode, to command mode.
I3 description for volume description of RAUX1.
Alternate Sample Frequency Select (I22)
RD2A4-RD2A0 Right DAC2 Attenuation. The least
significant bit represents 1.5 dB, with Default = 00000000
01000 = 0 dB. The total range is D7 D6 D5 D4 D3 D2 D1 D0
+12 dB to -33.0 dB with SRE DIV5 DIV4 DIV3 DIV2 DIV1 DIV0 CS2
11111 = muted. See Table 8.
CS2 Clock 2 Base Select. This bit selects
RD2IM Right DAC2 Input Mute. When set, the base clock frequency used for
the Right DAC2 to the input mixer is generating the audio sample rate.
muted. Note that the part uses only one
crystal to generate both clock base
RD2OM Right DAC2 Output Mute. When set, frequencies. This bit can be disabled
the right DAC2 to the output mixer is by setting IFSE in X11.
muted.
0 - 24.576 MHz base
1 - 16.9344 MHz base

40 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

DIV5 - DIV0 Clock Divider. These bits select the


audio sample frequency for both cap-
Alternate Feature Status (I24)
ture and playback. These bits can
be overridden by IFSE in X11. Default = x0000000
D7 D6 D5 D4 D3 D2 D1 D0
Fs = (2*XT)/(M*N) res rbc CI PI CU CO PO PU

XT = 24.576 MHz CS2 = 0 PU Playback Underrun: When set,


XT = 16.9344 MHz CS2 = 1 indicates the DAC has run out of
data and a sample has been missed.
N = DIV5-DIV0
16 ≤ N ≤ 49 for XT = 24.576 MHz PO Playback Overrun: When set,
12 ≤ N ≤ 33 for XT = 16.9344 MHz indicates that the host attempted to
write data into a full FIFO and the
(M set by OSM1,0 in I10) data was discarded.
M = 64 for Fs > 24 kHz
M = 128 for 12 kHz < Fs ≤ 24 kHz CO Capture Overrun: When set,
M = 256 for Fs ≤ 12 kHz indicates that the ADC had a sample
to load into the FIFO but the FIFO
SRE Alternate Sample Rate Enable. When was full. In this case, this bit is set
this bit is set to a one, bits 0-3 of I8 and the new sample is discarded.
will be ignored, and the sample fre-
quency is then determined by CS2, CU Capture Underrun: Indicates the host
DIV5-DIV0, and the oversampling has read more data out of the FIFO
mode bits OSM1, OSM0 in I10. Note than it contained. In this condition,
that this register can be overridden the bit is set and the last valid byte
(disabled) by IFSE in X11. is read by the host.

Extended Register Access (I23) PI Playback Interrupt: Indicates an


interrupt is pending from the play-
Default = 00000xx0 back DMA count registers.
D7 D6 D5 D4 D3 D2 D1 D0
XA3 XA2 XA1 XA0 XRAE XA4 res rbc CI Capture Interrupt: Indicates an
interrupt is pending from the capture
XA4 Extended Register Address bit 4. DMA count registers.
Along with XA3-XA0, enables ac-
cess to extended registers X16 The PI and CI bits are reset by writing a "0" to
through X31. MODE 3 only. the particular interrupt bit or by writing any
value to the Status register (R2).
XRAE Extended Register Access Enable.
Setting this bit converts this register
from the extended address register
to the extended data register. To con-
vert back to an address register, R0
must be written. MODE 3 only.

XA3-XA0 Extended Register Address. Along


with XA4, sets the register number
(X0-X31) accessed when XRAE is
set. MODE 3 only. See the WSS Ex-
tended Register section for more
details.

DS252PP2 41
TM
CS4235
CrystalClear Low Cost ISA Audio System

MIM Mono Input Mute. In MODE 3, MIM


mutes the MIN analog input to the
Compatibility ID (I25)
left output mixer channel. MIMR in
Default = 00000011 X4 mutes MIN analog input to the
D7 D6 D5 D4 D3 D2 D1 D0 right output mixer channel. In
V2 V1 V0 CID4 CID3 CID2 CID1 CID0 MODE 2, MIM mutes both left and
right channels. The mono input pro-
CID4-CID0 Chip Identification. Distinguishes vides mix for the "beeper" function in
between this chip and previous most personal computers. This bit is
codec chips that support this register initialized through the Hardware Con-
set. This register is fixed to indicate figuration data, Serial Port Control
code compatibility with the CS4236. byte.
X25 or C1 should be used to further
differentiate between parts that are 0 - no mute
compatible with the CS4236. 1 - muted

All Chips: 00011 - CS4236, CS423xB, CS4235 Left Master Output Volume (I27)
00010 - CS4232/CS4232A
00000 - CS4231/CS4231A Default = 00100011
D7 D6 D5 D4 D3 D2 D1 D0
V2-V0 Version number. As enhancements LOM LOS1 LOS0 LOG4 LOG3 LOG2 LOG1 LOG0
are made to the part, the version
number is changed so software can When Hardware Volume is enabled, VCEN in C8 or
distinguish between the different ver- X24 is set, this register will change based on external
sions. buttons.

000 - Compatible with the CS4236 LOG4-LOG0 Left Output, LOUT, Master Gain.
LOG0 is the least significant bit and
These bits are fixed for compatibility represents -2 dB, with 00011 = 0 dB.
with the CS4236. Register X25 or The span is nominally +6 dB to
C1 may be used to differentiate be- -56 dB. See Table 9.
tween the CS4236 and newer chips.
LOS1,0 Left Output Mixer Select. These bits
select and attenuation into the left
Mono Input Control (I26) output Master Gain stage, LOG4-0.
Default = exxxeeee
D7 D6 D5 D4 D3 D2 D1 D0 00 - -16 dB
MIM rbc rbc res MIA3 MIA2 MIA1 MIA0 01 - 0 dB
10 - -8 dB
11 - -24 dB
MIA3-MIA0 Mono Input Attenuation. When MIM
is 0, these bits set the level of MIN
summed into the mixer. These bits LOM Left Output Mute. When set to 1,
are initialized through the Hardware the left output, LOUT, is muted.
Configuration data, Serial Port Con-
trol byte.

0000 = 0 dB.
0001-1111 = -9 dB

42 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

ROS1,0 Right Output Mixer Select. These bits


select and attenuation into the right
Capture Data Format (I28) output Master Gain stage, ROG4-0.
Default = x0x0xxxx
D7 D6 D5 D4 D3 D2 D1 D0 00 - -16 dB
rbc 16B rbc S/M res res res res 01 - 0 dB
10 - -8 dB
S/M Stereo/Mono Select: This bit deter- 11 - -24 dB
mines how the capture audio data
stream is formatted. Selecting stereo ROM Right Output Mute. When set to 1,
will result with alternating samples the right output, ROUT, is muted.
representing left and right audio
channels. Selecting mono only cap- Capture Upper Base (I30)
tures data from the left audio
channel. MCE (R0) or CMCE (I16) Default = 00000000
must be set to modify S/M. See D7 D6 D5 D4 D3 D2 D1 D0
Changing Audio Data Formats sec- CUB7 CUB6 CUB5 CUB4 CUB3 CUB2 CUB1 CUB0
tion for more details.
CUB7-CUB0 Capture Upper Base: This register is
0 - Mono the upper byte which represents the
1 - Stereo 8 most significant bits of the 16-bit
Capture Base register. Reads from
16B selects between 8-bit unsigned and this this register returns the same
16-bit signed data for capture. The value that was written.
capture data format can be different
than the playback data format. MCE
Capture Lower Base (I31)
(R0) or CMCE (I16) must be set to
modify this register. See Changing Default = 00000000
Audio Data Formats section for D7 D6 D5 D4 D3 D2 D1 D0
more details. CLB7 CLB6 CLB5 CLB4 CLB3 CLB2 CLB1 CLB0

0 - 8-bit unsigned data CLB7-CLB0 Lower Base Bits: This register is the
1 - 16-bit signed data lower byte which represents the 8
least significant bits of the 16-bit
Right Master Output Volume (I29) Capture Base register. Reads from
this register returns the same value
Default = 00100011 which was written.
D7 D6 D5 D4 D3 D2 D1 D0
ROM ROS1 ROS0 ROG4 ROG3 ROG2 ROG1 ROG0

When Hardware Volume is enabled, VCEN in C8 or


X24 is set, this register will change based on external
buttons.

ROG4-ROG0 Right Output, ROUT, Master Gain.


ROG0 is the least significant bit and
represents -2 dB, with 00011 = 0 dB.
The span is nominally +6 dB to
-56 dB. See Table 9.

DS252PP2 43
TM
CS4235
CrystalClear Low Cost ISA Audio System

Address Reg. Register Name


WSS EXTENDED REGISTERS WSSbase+0 R0 Reset Address
The Windows Sound System codec contains WSSbase+1 R1 Address/Data access
I23 Indexed Address/Data
three sets of registers: R0-R3, I0-I31, and X0-
X31. R0-R3 are directly mapped to the ISA bus
through WSSbase+0 through WSSbase+3 re- Extended Register Access (I23)
spectively. R0 and R1 provide access to the D7 D6 D5 D4 D3 D2 D1 D0
XA3 XA2 XA1 XA0 XRAE XA4 res rbc
indirect registers I0-I31. The third set of registers
are extended registers X0-X31 that are indirectly
mapped through the WSS register I23. I23 acts Table 11. WSS Extended Register Control
as both the extended address and extended data
register. These extended registers are only avail- Index Register Name
able when in MODE 3. X0 Reserved, backwards compatible
X1 Reserved, backwards compatible
X2 MIC Volume
Accessing the X registers requires writing the
X3 MIC Volume (same as X2)
register address to I23 with XRAE set. When
X4 Synthesis and Input Mixer Control
XRAE is set, I23 changes from an address regis-
X5 Right Input Mixer Control
ter to a data register. Subsequent accesses to I23
X6 Left FM Synthesis Mute
access the extended data register. To convert I23 X7 Right FM Synthesis Mute
back to the extended address register, R0 must X8 Left DSP Serial Port Mute
be written which internally clears XRAE. As- X9 Right DSP Serial Port Mute
suming the part is in MODE 3, the following X10 Reserved, backwards compatible
steps access the X registers: X11 DAC1 Mute and IFSE Enable
X12 Independent ADC Sample Freq.
1. Write 17h to R0 (to access I23). X13 Independent DAC Sample Freq.
R1 is now the extended address register. X14 Reserved, backwards compatible
2. Write the desired X register address to R1 X15 Reserved, backwards compatible
with XRAE = 1. X16 Left Wavetable Serial Port Mute
R1 is now the extended data register. X17 Right Wavetable Serial Port Mute
3. Write/Read X register data from R1. X18 3D Enable & RAM Port Enable
X19 FM Volume Scaling
To read/write a different X register: X20 Reserved
4. Write 17h to R0 again. (resets XRAE) X21 Reserved
R1 is now the extended address register. X22 Reserved
5. Write the new X register address to R1 X23 (C2) 3D Space Control
with XRAE = 1. X24 (C8) Wavetable & Volume Control
R1 is now the new extended data register. X25 Chip Version and ID
X26 (Cb+0) Joystick Control
6. Read/Write new X register data from R1.
X27 (Cb+1) E2PROM Interface
X28 (Cb+2) Power Down Control 1
X29 (C9) Power Down Control 2
X30 (Cb+7) Global Status
X31 Reserved

Table 12. WSS Extended Registers

44 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

Control Registers for the Extended Registers


ADDRESS D7 D6 D5 D4 D3 D2 D1 D0
WSSbase+0 R0 INIT MCE TRD IA4 IA3 IA2 IA1 IA0
WSSbase+1 R1 ID7 ID6 ID5 ID4 ID3 ID2 ID1 ID0
I23 XA3 XA2 XA1 XA0 XRAE XA4 - -

Extended Registers: (X0-X31)


XA4 - XA0 D7 D6 D5 D4 D3 D2 D1 D0
X0 - - - - - - - -
X1 - - - - - - - -
X2 LMIM LMOM MBST MG4 MG3 MG2 MG1 MG0
X3 RMIM RMOM MBST MG4 MG3 MG2 MG1 MG0
X4 MIMR LIS1 LIS0 IFM - - - -
X5 - RIS1 RIS0 - - - - -
X6 LFMM - - - - - - -
X7 RFMM - - - - - - -
X8 LSPM - - - - - - -
X9 RSPM - - - - - - -
X10 - - - - - - - -
X11 LD1IM RD1IM IFSE - - - - -
X12 SRAD7 SRAD6 SRAD5 SRAD4 SRAD3 SRAD2 SRAD1 SRAD0
X13 SRDA7 SRDA6 SRDA5 SRDA4 SRDA3 SRDA2 SRDA1 SRDA0
X14 - - - - - - - -
X15 - - - - - - - -
X16 LWM - - - - - - -
X17 RWM - - - - - - -
X18 PAE - AUX1R 3DEN DSPD1 PSH - DLEN
X19 - FMS2 FMS1 FMS0 - - - -
X20 - - - - - - - -
X21 - - - - - - - -
X22 - - - - - - - -
X23 (C2) SPC3 SPC2 SPC1 SPC0 - - - -
X24 (C8) VCIE VCF1 - - WTEN VCEN DMCLK BRES
X25 V2 V1 V0 CID4 CID3 CID2 CID1 CID0
X26 (Cb+0) - - CONSW - - - JR1 JR0
X27 (Cb+1) ICH - - - - DIN/EEN DOUT CLK
X28 (Cb+2) PDWN SRC VREF MIX ADC DAC PROC FM
X29 (C9) RESET - - - - MIXCD DAC2 SPORT
X30 (Cb+7) CWSS ICTRL ISB IWSS IMPU WDT IMV -
X31 - - - - - - - -

Table 13. Extended Register Bit Summary

DS252PP2 45
46

CS9236 SERIAL PORT CS4610 SERIAL PORT

Mute X2L, X3R 20dB Gain Gain


X2 X2 MIC

s
s
s
s
s
DSP Port Enable
Wavetable Enable I16 * Mute I2L, I3R * Gain I2L AUX1

s
C8 I3R

s
(LINE IN)

s
Analog Input

s
s
s
s
s
Mixer Atten.

Σ
record

X4L
Mute I4L, I5R
PnP ISA Interface

ADC1 X5R Gain I4L AUX 2

s
I5R (CDROM)

s
s

s
s
s
s
s
Mute I18L
I19R Loopback
playback

Enable

s
I0L, I1R

s
s
DSPD1 Enable
Mute
X18 Mute X2L, X3R
X11L
s

s
X11R

s
s
Loop Enable
X18 * Mute I2L, I3R
s

s
Atten. I6L Mute I6L
I7R DAC1 I7R Mute I4L, I5R

CrystalClear Low Cost ISA Audio System


s
Mute X8L
s
Mute X16L
s
s
s
s
s
s

X17R X9R
Atten.

Σ
Gain I18L Mute I18L Gain I27L Mute I27L
s

DAC2 X27L LINE


I19R I19R I29R I29R
X29R OUT
s
s
s
s
s

s
s
s
s
s

TM
s
s
Analog Output
Mixer
Σ * I2/I3 can be
remapped to be
Mute I26L Atten. I26 controlled through
Mute X6L FM Syn. Enable X4R I18/I19.
X7R X4 s
s
s
s
s
s
s

CS4235
DS252PP2

MIN UP/DOWN/MUTE

Figure 4. Mixer Block Diagram


TM
CS4235
CrystalClear Low Cost ISA Audio System

Reserved (X0) Right Channel MIC (X3)


Default = xxxxxxxx Default = 01011111
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
rbc rbc rbc rbc rbc rbc rbc rbc RMIM RMOM MBST MG4 MG3 MG2 MG1 MG0

rbc Reserved, backwards compatible. MG4-MG0 Microphone gain.


The least significant bit represents
1.5 dB, with 01111 = 0 dB. These
Reserved (X1) are the same bits as in X2.
Default = xxxxxxxx See Table 9.
D7 D6 D5 D4 D3 D2 D1 D0
rbc rbc rbc rbc rbc rbc rbc rbc MBST Microphone 20 dB boost.
When set to 1, the MIC signal is
rbc Reserved, backwards compatible. gained by 20 dB. This is the same
bit as in X2.

MIC Volume (X2) RMOM Microphone Right Output Mixer Mute.


Default = 01011111 When set to 1, the signal to the right
channel output mixer is muted.
D7 D6 D5 D4 D3 D2 D1 D0
LMIM LMOM MBST MG4 MG3 MG2 MG1 MG0
RMIM Microphone Right Input Mixer Mute.
When set to 1, the signal to the right
MG4-MG0 Microphone Gain. The least signifi- channel input mixer is muted.
cant bit represents 1.5 dB, where
01111 = 0 dB and 11110 = -22.5 dB.
When all bits are 1, the Mic is muted Synthesis and Input Mixer Control (X4)
with one exception. If MBST = 1 Default = e00exxxx
when going from 11110 to 11111, the
D7 D6 D5 D4 D3 D2 D1 D0
Mic volume does not change. The
MIMR LIS1 LIS0 IFM rbc rbc res res
attenuation steps are shown in
Table 9.
IFM Internal FM enable. When set to 1,
MBST Microphone 20 dB boost. the internal FM synthesis engine is
When set to 1, the MIC signal is enabled. This bit can be set through
gained by 20 dB. the Hardware Configuration data in
the EEPROM.
LMOM Microphone Left Output Mixer Mute.
When set to 1, the signal to the left LIS1-LIS0 Left Input Mixer Summer Attenuator.
channel output mixer is muted. This attenuates the inputs to the left
input mixer to enable overload pro-
LMIM Microphone Left Input Mixer Mute. tection when multiple input sources
When set to 1, the signal to the left are utilized.
channel input mixer is muted.
00 - 0 dB
01 - -6 dB
10 - -12 dB
11 - -18 dB

DS252PP2 47
TM
CS4235
CrystalClear Low Cost ISA Audio System

MIMR Mono Input Mute to the Right Output


mixer. When set to 1, the MIN signal
Left DSP Serial Port Mute (X8)
to the right output mixer is muted.
The default state of this bit is set by Default = exxxxxxx
MIM in the Hardware Configuration D7 D6 D5 D4 D3 D2 D1 D0
Data, Mono & DSP Port byte. LSPM res rbc rbc rbc rbc rbc rbc

Right Input Mixer Control (X5) LSPM Left DSP Serial Port Mute. When set
to 1, the Left DSP Serial Port input
Default = x00xxxxx (SDIN) is muted. The default state of
D7 D6 D5 D4 D3 D2 D1 D0 this bit is the inverse of SPE in the
rbc RIS1 RIS0 res res res res res Hardware Configuration Data, Mono
& DSP Port byte.
RIS1-RIS0 Right Input Mixer Summer Attenuator.
This attenuates the inputs to the
Right DSP Serial Port Mute (X9)
right input mixer to enable overload
protection when multiple input Default = exxxxxxx
sources are utilized. D7 D6 D5 D4 D3 D2 D1 D0
RSPM res rbc rbc rbc rbc rbc rbc
00 - 0 dB
01 - -6 dB RSPM Right DSP Serial Port Mute. When
10 - -12 dB set to 1, the Right DSP Serial Port
11 - -18 dB input (SDIN) is muted. The default
state of this bit is the inverse of SPE
Left FM Synthesis Mute (X6) in the Hardware Configuration Data,
Mono & DSP Port byte.
Default = exxxxxxx
D7 D6 D5 D4 D3 D2 D1 D0
LFMM res rbc rbc rbc rbc rbc rbc Reserved (X10)
Default = xxxxxxxx
LFMM Left FM mute. When set to 1, the D7 D6 D5 D4 D3 D2 D1 D0
left internal FM input to DAC2 is rbc res rbc rbc rbc rbc rbc rbc
muted. The default state of this bit is
the inverse of IFM in the Hardware rbc Reserved, backwards compatible.
Configuration Data, Global Configura-
tion byte.
DAC1 Mute and IFSE Enable (X11)
Right FM Synthesis Mute (X7) Default = 110xxxxx
D7 D6 D5 D4 D3 D2 D1 D0
Default = exxxxxxx LD1IM RD1IM IFSE res res res res res
D7 D6 D5 D4 D3 D2 D1 D0
RFMM res rbc rbc rbc rbc rbc rbc
IFSE Independent Sample Freq. Enable.
When set to 1, the extended
RFMM Right FM mute. When set to 1, the registers X12 and X13 are used to
right internal FM input to DAC2 is set the sample rate, and registers I8,
muted. The default state of this bit is I10 (OSM1,0), and I22 are ignored.
the inverse of IFM in the Hardware X12 and X13 cannot be modified un-
Configuration Data, Global Configura- less this bit is set to 1.
tion byte.
RD1IM Right DAC1 Input Mixer Mute.
When set to 1, the output from the
Right DAC1 is muted to the Right in-
put mixer. See Figure 4.

48 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

LD1IM Left DAC1 Input Mixer Mute.


When set to 1, the output from the
Right Wavetable Serial Port Mute (X17)
Left DAC1 is muted to the Left input
mixer. See Figure 4. Default = e0000000
D7 D6 D5 D4 D3 D2 D1 D0
RWM res rbc rbc rbc rbc rbc rbc
Independent ADC Fs (X12)
Default = xxxxxxxx RWM Right Wavetable Serial Port Mute.
D7 D6 D5 D4 D3 D2 D1 D0 When set, the Right Wavetable Se-
SRAD7 SRAD6 SRAD5 SRAD4 SRAD3 SRAD2 SRAD1 SRAD0 rial Input to DAC2 is muted. The
default state of this bit is the inverse
SRAD7-SRAD0 Sample Rate frequency select for of WTEN in the Hardware Configura-
the A/D converter. See Table 10. tion Data, Global Configuration byte.

Independent DAC Fs (X13) 3D and RAM Port Enable (X18)


Default = xxxxxxxx Default = 0xeeeex0
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
SRDA7 SRDA6 SRDA5 SRDA4 SRDA3 SRDA2 SRDA1 SRDA0 PAE res AUX1R 3DEN DSPD1 PSH res DLEN

SRDA7-SRDA0 Sample Rate frequency select for DLEN Digital Loopback Enable. When set,
the D/A converter. See Table 10. the input to DAC1 to comes from the
ADCs. While DLEN is on, no other
data is sent to DAC1. This provides
Reserved, backwards compatible (X14) a test path that is generally not used
Default = xxxxxxxx in normal operation.
D7 D6 D5 D4 D3 D2 D1 D0
rbc rbc rbc rbc rbc rbc rbc rbc PSH Playback Sample Hold. When set, the
last sample is held in DAC1 when
rbc Reserved, backwards compatible. PEN is cleared. When clear, zero is
sent to DAC1 when PEN is cleared.

Reserved, backwards compatible (X15) DSPD1 DSP port controls DAC1. When set,
Default = xxxxxxxx the serial DSP port controls DAC1 in-
stead of the ISA playback FIFO.
D7 D6 D5 D4 D3 D2 D1 D0
rbc rbc rbc rbc rbc rbc rbc rbc
3DEN 3D Sound Enable. When set, 3D
sound is enabled on L/ROUT. This
rbc Reserved, backwards compatible. bit is also controlled through C3.

Left Wavetable Serial Port Mute (X16) AUX1R AUX1 Remap. When set, writes to
I18/19 (DAC2 volume) also control
Default = exxxxxx the AUX1 volume. When clear,
D7 D6 D5 D4 D3 D2 D1 D0 I18/19 control DAC2 volume and
LWM res rbc rbc rbc rbc rbc rbc I2/3 control AUX1 volume. This bit
provides some backwards compatibil-
LWM Left Wavetable Serial Port Mute. ity when AUX1 analog inputs are
When set, the Left Wavetable Serial substituted for LINE analog inputs
Input to DAC2 is muted. The default which are no longer available.
state of this bit is the inverse of
WTEN in the Hardware Configura- PAE Processor Access Enable. When set,
tion Data, Global Configuration byte. I20/21 provide access to the Proces-
sor identically to CTRLbase+5/+6
respectively.

DS252PP2 49
TM
CS4235
CrystalClear Low Cost ISA Audio System

FM Volume Scaling (X19) 3D Space Control (X23)


Default = xeeexxxx Default = 0000xxxx
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
res FMS2 FMS1 FMS0 res res res res SPC3 SPC2 SPC1 SPC0 res res res res

FMS2-FMS0 FM Volume Scaling relative to wave- This register and C2 access the same data.
table digital input. These bits are
provided for backwards compatibility SPC3-SPC0 Space control for 3D sound.
with previous chips. These bits are Control’s the "width" of the sound ex-
initialized through Hardware Configu- pansion with increasing numbers
ration data. giving decreasing space affects. The
least sigificant bit represents 1.5 dB
010 - 0 dB of attenuation, with 0000 = 0 dB (full
011 - +6 dB space affect).
100 - -12 dB
101 - -6 dB
110 - +12 dB
CS9236 Wavetable Control (X24)
111 - +18 dB Default = 0exxee00
D7 D6 D5 D4 D3 D2 D1 D0
Reserved (X20) VCIE VCF1 res res WTEN VCEN DMCLK BRES

Default = xxxxxxxx This register and C8 access the same data.


D7 D6 D5 D4 D3 D2 D1 D0
res res res res res res res res BRES Force BRESET low. When set, the
BRESET pin is forced low. Typically
res Reserved. Could read as 0 or 1. used for power management of pe-
ripheral devices.
Reserved (X21) DMCLK Disable MCLK. When set, the MCLK
Default = xxxxxxxx pin of the CS9236 Wavetable Syn-
D7 D6 D5 D4 D3 D2 D1 D0 thesizer serial interface is forced low
res res res res res res res res providing a power savings mode.

VCEN Volume Control Enable. When set,


res Reserved. Could read as 0 or 1.
the UP, DOWN, and MUTE pins be-
come active and provide hardware
Reserved (X22) master volume control for the line
outputs. Note that this bit can be in-
Default = xxxxxxxx itialized at power-up through
D7 D6 D5 D4 D3 D2 D1 D0 Hardware Configuration data, Misc.
res res res res res res res res
Configuration Byte.

res Reserved. Could read as 0 or 1. WTEN Wavetable Serial Port Enable. When,
set, the CS9236 Single-Chip Wave-
table Music Synthesizer serial port
pins are enabled. WTEN can be in-
itialized in the E2PROM Hardware
Configuration data, Global Configura-
tion byte.

50 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

VCF1 Hardware Volume Control Format. Joystick Control (X26)


This bit controls the format of the Default = xx0x0x01
UP, DOWN, and MUTE pins. VCF1
D7 D6 D5 D4 D3 D2 D1 D0
is initialized in the E2PROM Hard-
rbc rbc CONSW rbc ZERO rbc JR1 JR0
ware Configuration data, Global
Configuration byte.
X26 and CTRLbase+0 access the same data with the
0 - MUTE is a momentary button. exception that the XTAL bit in CTRLbase is replaced
Pressing MUTE toggles between with ZERO in this register.
mute and un-mute. Pressing UP or
DOWN will always un-mute. JR1,0 Joystick rate control. Selects operating
speed of the joystick (changes the
1 - MUTE is not used. Pressing the trigger threshold for the X/Y coordi-
up and down buttons simultane- nates).
ously causes the volume to mute.
Pressing up or down singularly will 00 - slowest speed
un-mute. 01 - medium slow speed
10 - medium fast speed
VCIE Volume Control Interrupt Enable. 11 - fastest speed
When set, the hardware volume
control pins cause interrupts, when ZERO This bit MUST be written to 0. Writing
pressed, on the WSSint pin. The this bit to 1 will disable the entire
status is available in CTRLbase+7, WSS register space.
IMV bit. The IMV bit is cleared by
reading CTRLbase+7. CONSW controls host interrupt generation
when a context switch occurs
Chip Version and ID (X25) 0 - no interrupt on context switch
Default = 11011101 1 - Control interrupt generated on
D7 D6 D5 D4 D3 D2 D1 D0 context switch
V2 V1 V0 CID4 CID3 CID2 CID1 CID0
E2PROM Interface (X27)
CID5-CID0 Chip Identification. Distinguishes CTRLbase+1, Default = 1xxxx000
between this chip and other codec D7 D6 D5 D4 D3 D2 D1 D0
chips that support this register set. ICH rbc rbc rbc rbc DIN/ DOUT CLK
This register is identical to C1 and EEN
replaces the ID register in I25.
X27 and CTRLbase+1 access the same data.
11101 - CS4235
CLK This bit is used to generate the clock
V2-V0 Version Number. As enhancements for the Plug and Play E2PROM.
are made, the version number is EEN must be set to 1 to make this
changed so software can distinguish bit operational. A 1 sets the SCL pin
between the different versions of the high and a 0 sets the SCL pin low.
same chip.
DOUT This bit is used to output serial data
100 - Revision A to the Plug and Play E2PROM. EEN
101 - Revision B must be set to 1 to make this bit op-
110 - Revision C erational. A 0 causes SDA to go low.
A 1 releases SDA (open-drain).

DS252PP2 51
TM
CS4235
CrystalClear Low Cost ISA Audio System

DIN/EEN When read (DIN), this bit reflects this chip will be lost, including this
the SDA pin, which should be serial one, since the power-up state for
data output from the Plug and Play PnP is all resources unassigned.
E2PROM. EEN and DOUT must be
1 for this bit to function.
Global Status (X30)
When written (EEN), enables the CTRLbase+7, Default = 1000000x
E2PROM interface: CLK and DOUT D7 D6 D5 D4 D3 D2 D1 D0
onto the SCL/SDA pins. Writing: CWSS ICTRL ISB IWSS IMPU WDT IMV res

0 - E2PROM interface disabled X30 and CTRLbase+7 access the same data.
1 - E2PROM interface enabled
IMV Hardware Master Volume Control
ICH Interrupt polarity - CDROM. When set, Interrupt Status. A hardware volume
the CDINT pin is an active high sig- control interrupt is pending when set
nal. When low, CDINT is an active to 1. Master Volume Interrupts are
low signal. This bits can be initial- enabled through VCIE in C8/X24.
ized through the Hardware This bit can only be cleared through
Configuration data. CTRLbase+7, not X30.

Block Power Down (X28) WDT Watch-Dog Timer. If an error occurs


Default = 00000000 on the ISA bus, the Processor will
be reset and WDT will be set.
D7 D6 D5 D4 D3 D2 D1 D0
PDWN SRC VREF MIX ADC1 DAC1 PROC FM
IMPU MPU-401 Interrupt status. MPU inter-
rupt pending when set to 1.
This register and CTRLbase+2 access the same
data. See CTRLbase+2 for a detailed description of IWSS Windows Sound System Interrupt
each bit. Status. WSS interrupt pending when
set to 1.
Power Management (X29)
ISB Sound Blaster Interrupt status. Sound
Default = 0xxxx000 Blaster interrupt pending when set to
D7 D6 D5 D4 D3 D2 D1 D0 1.
RESET res res res res MIXCD DAC2 SPORT
ICTRL Control Logical Device 2 Interrupt
This register and C9 access the same data. status. A context switch interrupt is
pending when set to 1.
SPORT Powers down the serial ports.
CWSS Context - WSS. Indicates the current
DAC2 Powers down DAC2 including FM and context.
the CS9236 serial interface.
0 - Sound Blaster Emulation
MIXCD Powers down the analog mixer - with 1 - Windows Sound System
the exception of MIN, AUX2, and the
line outputs. Reserved (X31)
RESET When this bit goes from a 1 to a 0, a Default = xxxxxxxx
software RESDRV is initiated caus- D7 D6 D5 D4 D3 D2 D1 D0
ing the entire chip to be reset and res res res res res res res res
placed in its default power-up con-
figuration. Access to all registers on res Reserved. Could read as 0 or 1.

52 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

SOUND BLASTER INTERFACE located at the PnP address ’SBbase’. The fol-
lowing registers, shown in Table 14, are
The Sound Blaster Pro compatible interface is
provided for Sound Blaster compatibility.
the third physical device in logical device 0.
Since the WSS Codec and the Sound Blaster are
Left/Right FM Registers,
mutually exclusive, the WSS Codec interrupt
SBbase+0 - SBbase+3
and playback DMA channel are shared with the
These registers are mapped directly to the appro-
Sound Blaster interface.
priate FM synthesizer registers.
Mode Switching Mixer Address Register,
To facilitate switching between different func- SBbase+4, write only
tional modes (i.e. Sound Blaster and Windows This register is used to specify the index address
Sound System), logic is included to handle the for the mixer. This register must be written be-
switch transparently to the host. No special soft- fore any data is accessed from the mixer
ware is required on the host side to perform the registers. The mixer indirect register map is
mode switch. shown in Table 15.

Sound Blaster Direct Register Interface Mixer Data Register,


The Sound Blaster software interface utilizes 10- SBbase+5
bit address decoding and is compatible with This register provides read/write access to a par-
Sound Blaster and Sound Blaster Pro interfaces. ticular mixer register depending on the index
10-bit addressing requires that the upper address address specified in the Mixer Address Register.
bits be 0 to decode a valid address, i.e. no alias-
ing occurs. This device requires 16 I/O locations

Address Description Type


SBbase+0 Left FM Status Port Read
SBbase+0 Left FM Register Status Port Write
SBbase+1 Left FM Data Port Write Only
SBbase+2 Right FM Status Port Read
SBbase+2 Right FM Register Status Port Write
SBbase+3 Right FM Status Port Write Only
SBbase+4 Mixer Register Address Write Only
SBbase+5 Mixer Data Port Read/Write
SBbase+6 Reset Write Only
SBbase+8 FM Status Port Read Only
SBbase+8 FM Register port Write
SBbase+9 FM Data Port Write Only
SBbase+A Read Data Port Read Only
SBbase+C Command/Write Data Write
SBbase+C Write Buffer Status (Bit 7) Read
SBbase+E Data Available Status (Bit 7) Read

Table 14. Sound Blaster Pro Compatible I/O Interface

DS252PP2 53
TM
CS4235
CrystalClear Low Cost ISA Audio System

Reset accept another command to the Command/Write


SBbase+6, write only Data register. D[7]=1 indicates ready. D[7]=0 in-
When bit D[0] of this register is set to a one and dicates not ready.
then set to a zero, a reset of the Sound Blaster
interface will occur. Sound Blaster Mixer Registers
The Sound Blaster mixer registers are shown in
Read Data Port Table 15.
SBbase+A, read only
When bit D[7] of the Data Available Register, Reset Register,
SBbase+E, is set =1 then valid data is available Mixer Index 00H
in this register. The data may be the result of a Writing any value to this register will reset the
Command that was previously written to the mixer to default values.
Command/Write Data Register or digital audio
data. Voice Volume Register,
Mixer Index 04H, Default = 99H
Command/Write Data This register provides 8 steps of voice volume
SBbase+C, write only control each for the right and left channels.
The Command/Write Data register is used to
send Sound Blaster Pro commands. Microphone Mixing Register,
Mixer Index 0AH, Default = 01H
Write Buffer Status, This register provides 4 steps of microphone vol-
SBbase+C, read only ume control.
The Write Buffer Status register bit D[7] indi-
cates when the SBPro interface is ready to

Register D7 D6 D5 D4 D3 D2 D1 D0
00H DATA RESET
02H RESERVED
04H VOICE VOLUME LEFT VOICE VOLUME RIGHT
06H RESERVED
08H RESERVED
0AH X X X X X MIC MIXING
0CH X X X INPUT SELECT X
0EH X X X X X X VSTC X
20H RESERVED
22H MASTER VOLUME LEFT MASTER VOLUME RIGHT
24H RESERVED
26H FM VOLUME LEFT FM VOLUME RIGHT
28H CD VOLUME LEFT CD VOLUME RIGHT
2AH RESERVED
2CH RESERVED
2EH LINE VOLUME LEFT LINE VOLUME RIGHT

Table 15. SBPro Compatible Mixer Interface

54 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

Input Control Register, Plug and Play configuration capability will allow
Mixer Index 0CH the joystick I/O base address, GAMEbase, to be
This register selects the input source to the ADC. located anywhere within the host I/O address
D2,D1 - 00 - Microphone space. Currently most games software assume
01 - CD Audio that the joystick I/O port is located at 200h.
10 - Microphone
11 - Line In A write to the GAMEbase register triggers four
timers. A read from the same register returns
Output Control Register, four status bits corresponding to the joystick fire
Mixer Index 0EH buttons and four bits that correspond to the out-
VSTC - 0 - Mono Mode put from the four timers.
1 - Stereo Mode
A button value of 0 indicates the button is
Master Volume Register, pressed or active. The button default state is 1.
Mixer Index 22H, Default = 99H When GAMEbase is written, the X/Y timer bits
This register provides 8 steps of master volume go high. Once GAMEbase is written, each timer
control each for the right and left channels. output remains high for a period of time deter-
mined by the current joystick position. The
FM Volume Register, number in parenthesis below is the joystick con-
Mixer Index 26H, Default = 99H nector pin number.
This register provides 8 steps of FM volume
control each for the right and left channels. GAMEbase+0 - GAMEbase+7
D7 D6 D5 D4 D3 D2 D1 D0
CD Volume Register, JBB2 JBB1 JAB2 JAB1 JBCY JBCX JACY JACX
Mixer Index 28H, Default = 01H
This register provides 8 steps of CD volume JACX Joystick A, Coordinate X (pin 3)
control each for the right and left channels.
JACY Joystick A, Coordinate Y (pin 6)

Line-In Volume Register, JBCX Joystick B, Coordinate X (pin 11)


Mixer Index 2EH, Default = 01H
This register provides 8 steps of line-in volume JBCY Joystick B, Coordinate Y (pin 13)
control each for the right and left channels.

GAME PORT INTERFACE JAB1 Joystick A, Button 1 (pin 2)


The Game Port logical device software interface
utilizes 10-bit address decoding and is located at JAB2 Joystick A, Button 2 (pin 7)
PnP address ’GAMEbase’. 10-bit addressing re-
JBB1 Joystick B, Button 1 (pin 10)
quires that the upper address bits be 0 to decode
a valid address, i.e. no aliasing occurs. For back- JBB2 Joystick B, Button 2 (pin 14)
wards compatibility, the Game Port consists of 8
I/O locations where the lower 6 alias to the same
location, which consists of one read and one
write register.

DS252PP2 55
TM
CS4235
CrystalClear Low Cost ISA Audio System

Two bits, JR1 and JR0, are located in the Con- The Game Port hardware interface consists of
trol register space (CTRLbase+0) for defining 8 pins that connect directly to the standard game
the speed of the Game Port Interface. Four dif- port connector. Buttons must have a 1000 pF ca-
ferent rates are software selectable for use with pacitor to ground and have internal 20 kΩ
various joysticks and to support older software pullups resistors. X/Y coordinates must have a
timing loops with aliasing (roll-over) problems. 5.6 nF capacitor to ground and a 2.2 kΩ series
resistor to the appropriate joystick connector pin.
Figure 5 illustrates the schematic to the joystick
connector.

VDF
CRYSTAL
1
CODEC
9
JAB1 2
JBB1 10
2.2 k Ω
JACX 3
2.2 k Ω
JBCX 11
5.6 nF 1 nF 1 nF 4
5.6 nF
12
5
2.2 k Ω
JBCY 13
JACY 2.2 k Ω
6
JBB2 14
JAB2 7
15
MIDOUT 5.6 nF 5.6 nF 1 nF 1 nF 8

MIDIN

Figure 5. Joystick Logic

56 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

CONTROL INTERFACE Address Register


The Control logical device includes registers for CTRLbase+0 Joystick Control
controlling various functions of the part that are CTRLbase+1 E2PROM Interface
not included in the other logical device blocks. CTRLbase+2 Block Power Down
CTRLbase+3 Control Indirect Address Reg.
These functions include game port rate control
CTRLbase+4 Control Indirect Data Register
and programmable power management, as well
CTRLbase+5 Control/RAM Access
as extra mixing functions.
CTRLbase+6 RAM Access End
CTRLbase+7 Global Status
Control Register Interface
The Control logical device software interface oc-
Table 16. Control Logical Device Registers
cupies 8 I/O locations, utilizes 12-bit address
decoding, and is located at PnP address
’CTRLbase’. If the upper address bits, SA12- E2PROM Interface
SA15 are used, they must be 0 to decode a valid CTRLbase+1, Default = 1xxxx000
address. This device can also support an inter- D7 D6 D5 D4 D3 D2 D1 D0
rupt. Table 16 lists the eight Control registers. ICH rbc rbc rbc rbc DIN/ DOUT CLK
EEN

CLK This bit is used to generate the clock


Joystick Control for the Plug and Play E2PROM.
CTRLbase + 0, Default = xx0x0x01 EEN must be set to 1 to make this
D7 D6 D5 D4 D3 D2 D1 D0 bit operational. A 1 sets the SCL pin
rbc rbc CONSW rbc XTAL rbc JR1 JR0 high and a 0 sets the SCL pin low.

JR1,0 Joystick rate control. Selects operating DOUT This bit is used to output serial data
speed of the joystick (changes the to the Plug and Play E2PROM. EEN
trigger threshold for the X/Y coordi- must be set to 1 to make this bit op-
nates). erational. A 0 causes SDA to go low.
A 1 releases SDA (open-drain).
00 - slowest speed
01 - medium slow speed DIN/EEN When read (DIN), this bit reflects
10 - medium fast speed the SDA pin, which should be serial
11 - fastest speed data output from the Plug and Play
E2PROM. EEN and DOUT must be
XTAL Crystal Oscillator disable. When set, all 1 for this bit to function.
functions are disabled except access
to this register. All registers retain When written (EEN), enables the
their values in this power-down E2PROM interface: CLK and DOUT
mode. onto the SCL/SDA pins. Writing:

CONSW controls host interrupt generation 0 - E2PROM interface disabled


when a context switch occurs 1 - E2PROM interface enabled

0 - no interrupt on context switch ICH Interrupt polarity - CDROM. When set,


1 - Control interrupt generated on the CDINT pin is an active high sig-
context switch nal. When low, CDINT is an active
low signal. This bits can be initial-
ized through the Hardware
Configuration data.

DS252PP2 57
TM
CS4235
CrystalClear Low Cost ISA Audio System

NOTE: Software should mute the DACs and Mixers


and FM volume when asserting any power-down
Block Power Down
modes to prevent clicks and pops.
CTRLbase+2, Default = 00000000
D7 D6 D5 D4 D3 D2 D1 D0
PDWN SRC VREF MIX ADC1 DAC1 PROC FM Control Indirect Address Register
CTRLbase+3
FM Internal FM synthesizer powered D7 D6 D5 D4 D3 D2 D1 D0
down when set. res res res res CA3 CA2 CA1 CA0

PROC Processor set to idle mode. When set, CA3-CA0 Address bits to access the Control
places the internal processor in an Indirect registers C0-C9 through
idle state. This effects the PnP inter- CTRLbase+4
face, MPU401, and SBPro devices.
Any command to any one of these
interfaces will cause the processor Control Indirect Data Register
to go active.
CTRLbase+4
DAC1 DAC1 power down. When set, powers D7 D6 D5 D4 D3 D2 D1 D0
CD7 CD6 CD5 CD4 CD3 CD2 CD1 CD0
down DAC1. Playback is disabled.

ADC1 ADC1 power down. When set, powers CD7-CD0 Control Indirect Data register. This
down the ADC1. Capture is disabled. register provides access to the indi-
rect registers C0-C9, where
MIX Mixer power down. All analog input CTRLbase+3 selects the actual reg-
and output channels are powered ister. See the Control Indirect
down. All outputs are centered Register section for more details.
around VREF if the VREF bit is set.
A reset is not required to maintain Control/RAM Access
the calibrated state if the mixer is
powered down but the VREF bit is CTRLbase+5
not set. D7 D6 D5 D4 D3 D2 D1 D0
CR7 CR6 CR5 CR4 CR3 CR2 CR1 CR0
VREF VREF power down. When set, powers
down the entire mixer. Since CR7-CR0 This register controls the loading of
powering down VREF, powers down the part’s internal RAM. RAM sup-
the entire analog section, some audi- port includes hardware configuration
ble pops can occur. and PnP default resource data, as
well as program memory. See the
SRC Internal Sample-Rate Converters are Hostload Procedure section for more
powered down. Only 44.1 kHz sam- information. Commands are followed
ple frequency is allowed when this by address and data information.
bit is set.
Commands: 0x55 - Disable PnP Key
PDWN Global Power Down with data reten-
tion. When set, the entire chip is 0x56 - Disable Crystal Key
powered down, except reads and
writes to this register. When this bit 0x53 - Disable Crystal Key 2
is cleared, a full calibration is initi-
ated. All registers retain their values; 0x5A - Update Hardware Configura-
therefore, normal operation can re- tion Data.
sume after calibration is completed.
0xAA - Download RAM. Address
followed by data. (Stopped by writ-
ing 0 to CTRLbase+6)

58 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

RAM Access End Control Indirect Registers


CTRLbase+6 The Control Indirect registers are accessed
D7 D6 D5 D4 D3 D2 D1 D0 through CTRLbase+3 and CTRLbase+4.
RE7 RE6 RE5 RE4 RE3 RE2 RE1 RE0 CTRLbase+3 is the address register and
CTRLbase+4 is the data register used to access
RE7-RE0 A 0 written to this location resets the C0 through C9 indirect registers.
previous location, CTRLbase+5,
from data download mode to com-
mand mode.
Address Register Name
CTRLbase+3 Control Indirect Address
Global Status CTRLbase+4 Control Indirect Data
CTRLbase+7, Default = 0000000x
D7 D6 D5 D4 D3 D2 D1 D0
CWSS ICTRL ISB IWSS IMPU WDT IMV res Table 17. Control Indirect Access Registers

IMV Hardware Master Volume Control


Interrupt Status. When set, hard-
ware volume has changed. IMV is Index Register Name
cleared by reading this status regis- C0 Reserved
ter. Master Volume Interrupts are C1 Version / Chip ID
enabled through VCIE in C8. C2 3D Space Control
C3 3D Enable
WDT Watch-Dog Timer. If an error occurs
C4 Reserved
on the ISA bus, the Processor will
be reset and WDT will be set. C5 Reserved
C6 Reserved
IMPU MPU-401 Interrupt status. MPU inter- C7 Reserved
rupt pending when set to 1. C8 Wavetable & Volume Control
C9 Power Management
IWSS Windows Sound System Interrupt
Status. WSS interrupt pending when Table 18. Control Indirect Registers
set to 1.

ISB Sound Blaster Interrupt status. Sound


Blaster interrupt pending when set to
1.

ICTRL Control Logical Device 2 Interrupt


status. A context switch interrupt is
pending when set to 1.

CWSS Context - WSS. Indicates the current


context.

0 - Sound Blaster Emulation


1 - Windows Sound System

DS252PP2 59
TM
CS4235
CrystalClear Low Cost ISA Audio System

Reserved (C0) 3D Enable (C3)


Default = xxxxxxxx Default = xxxexxxx
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
rbc res res res res rbc rbc rbc rbc rbc rbc 3DEN res res res res

rbc Reserved, backwards compatible. 3DEN Enable 3D Sound. When set,


3D sound expansion is enabled on
the analog outputs with the amount
Version / Chip ID (C1) of 3D enhancement controlled
Default = 11011101 through C2.
D7 D6 D5 D4 D3 D2 D1 D0
V2 V1 V0 CID4 CID3 CID2 CID1 CID0 Reserved (C4)
CID4-CID0 Chip Identification. Distinguishes Default = xxxxxxxx
between this chip and other codec D7 D6 D5 D4 D3 D2 D1 D0
chips that support this register set. rbc rbc rbc rbc res res res res
This register is identical to the WSS
X25 register. rbc Reserved, backwards compatible.

11101 - CS4235
Reserved (C5)
V2-V0 Version number. As enhancements Default = xxxxxxxx
are made, the version number is D7 D6 D5 D4 D3 D2 D1 D0
changed so software can distinguish rbc rbc rbc rbc rbc rbc rbc rbc
between the different versions of the
same chip. rbc Reserved, backwards compatible.
100 - Revision A
101 - Revision B Reserved (C6)
110 - Revision C Default = xxxxxxxx
D7 D6 D5 D4 D3 D2 D1 D0
3D Space Control (C2) rbc rbc rbc rbc rbc rbc rbc rbc

Default = 0000xxxx
rbc Reserved, backwards compatible.
D7 D6 D5 D4 D3 D2 D1 D0
SPC3 SPC2 SPC1 SPC0 rbc rbc rbc rbc
Reserved (C7)
SPC3-SPC0 Space control for 3D sound.
Default = xxxxxxxx
Control’s the "width" of the sound ex-
pansion with increasing numbers D7 D6 D5 D4 D3 D2 D1 D0
res res res res res res res res
giving decreasing space affects. The
least sigificant bit represents 1.5 dB
of attenuation, with 0000 = 0 dB (full res Reserved. Must write 0. Could read
space affect). as 0 or 1.

60 DS252PP2
TM
CS4235
CrystalClear Low Cost ISA Audio System

VCIE Volume Control Interrupt Enable.


When set, the hardware volume
Wavetable & Volume Control (C8) control pins cause interrupts, when
Default = 0exxee00 pressed, on the WSSint pin. The
D7 D6 D5 D4 D3 D2 D1 D0 status is available in CTRLbase+7,
VCIE VCF1 res res WTEN VCEN DMCLK BRES IMV bit.

BRES Force BRESET low. When set, the Power Management (C9)
BRESET pin is forced low. Typically
used for power management of pe- Default = 0xxxx000
ripheral devices. D7 D6 D5 D4 D3 D2 D1 D0
RESET res res res res MIXCD DAC2 SPORT
DMCLK Disable MCLK. When set, the MCLK
pin of the CS9236 Wavetable Syn- SPORT Powers down the serial ports.
thesizer serial interface is forced low
providing a power savings mode. DAC2 Powers down DAC2 including FM and
the CS9236 serial interface.
VCEN Volume Control Enable. When set,
the UP, DOWN, and MUTE pins be- MIXCD Powers down the analog mixer - with
come active and provide hardware the exception of MIN, AUX2, and the
master volume control for the line line outputs.
outputs. Note that this bit can be in-
itialized at power-up through RESET When this bit goes from a 1 to a 0, a
Hardware Configuration data, Misc. software RESDRV is initiated caus-
Configuration Byte. ing the entire chip to be reset and
placed in its default power-up con-
WTEN Wavetable Serial Port Enable. When, figuration. Access to all registers on
set, the CS9236 Single-Chip Wave- this chip will be lost, including this
table Music Synthesizer serial port one, since the power-up state for
pins are enabled. WTEN can be in- PnP is all resources unassigned.
itialized in the E2PROM Hardware
Configuration data, Global Configura-
tion byte.

VCF1 Hardware Volume Control Format.


This bit controls the format of the
UP, DOWN, and MUTE pins. VCF1
is initialized in the E2PROM Hard-
ware Configuration data, Global
Configuration byte.

0 - MUTE is a momentary button.


Pressing MUTE toggles between
mute and un-mute. Pressing UP or
DOWN will always un-mute.

1 - MUTE is not used. Pressing the


up and down buttons simultane-
ously causes the volume to mute.
Pressing up or down singularly will
un-mute.

DS252PP2 61
CS4235
TM
CrystalClear Low Cost ISA Audio System

MPU-401 INTERFACE All MIDI transmit data is transferred through a


16-byte FIFO and receive data through a 16-byte
The MPU-401 is an intelligent MIDI interface
FIFO. The FIFO gives the ISA interface time to
that was introduced by Roland in 1984. Voyetra
respond to the asynchronous MIDI transfer rate
Technologies subsequently introduced an IBM-
of 31.25 k baud.
PC plug in card that incorporated the MPU-401
functionality. The MPU-401 has become the de-
The Command/Status Registers occupy the same
facto standard for controlling MIDI devices via
address and are used to send instructions to and
IBM-PC compatible personal computers.
receive status information from the MPU-401.
Although the MPU-401 does have some intelli-
Command Register, write only
gence, a non-intelligent mode is available in
MPUbase+1
which the MPU-401 operates as a basic UART.
D7 D6 D5 D4 D3 D2 D1 D0
CS7 CS6 CS5 CS4 CS3 CS2 CS1 CS0
By incorporating hardware to emulate the MPU-
401 in UART mode, MIDI capability is CS7-CS0 For each write to the Command/
supported. Status Register, an appropriate
acknowledge is generated.
MPU-401 Register Interface
Status Register, read only
The MPU-401 logical device software interface
MPUbase+1
occupies 2 I/O locations, utilizes 10-bit address
D7 D6 D5 D4 D3 D2 D1 D0
decoding, and is located at PnP address RXS TXS CS5 CS4 CS3 CS2 CS1 CS0
’MPUbase’. 10-bit addressing requires that the
upper address bits be 0 to decode a valid ad- CS5-CS1 D0-D5 are the 6 LSBs of the last
dress, i.e. no aliasing occurs. The standard base command written to this port.
address is 330h. This device also uses an inter-
rupt, typically 9. TXS Transmit Buffer Status Flag.

0 - Transmit buffer not full


MPUbase+0 is the MIDI Transmit/Receive port 1 - Transmit buffer full
and MPUbase+1 is the Command/Status port. In
addition to I/O decodes the only additional func- RXS Receive Buffer Status Flag
tionality required from an ISA bus viewpoint is
the generation of a hardware interrupt whenever 0 - Data in Receive buffer
1 - Receive buffer empty
data has been received into the receive buffer.

MIDI Transmit/Receive Port, When in "UART" mode, data is received into the
MPUbase+0 receive buffer FIFO and a hardware interrupt is
D7 D6 D5 D4 D3 D2 D1 D0 generated. Data can be received from two
TR7 TR6 TR5 TR4 TR3 TR2 TR1 TR0 sources: MIDI data via the UART serial input or
acknowledge data that is the result of a write to
TR7-TR0 The MIDI Transmit/Receive Port is
used to send and receive MIDI data
the Command Register (MPUbase+1). The inter-
as well as status information that rupt is cleared by a read of the MIDI Receive
was returned from a previously sent Port (MPUbase+0).
command.

62 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

UART mode operation is defined as follows:


MIDI UART
The UART is used to convert parallel data to the 1. All writes to the Transmit Port, MPUbase+0,
serial data required by MIDI. The serial data rate are placed in the transmit buffer FIFO.
is fixed at 31.25 k baud (±1%). The serial data Whenever the transmit buffer FIFO is not
format is RS-232 like: 1 start bit, 8 data bits, and empty, the next byte is read from the buffer
1 stop bit. and sent out the MIDOUT pin. The Status
Register, MPUbase+1, bit 6, TXS is updated
In multimedia systems, the MIDI pins are typi- to reflect the transmit buffer FIFO status.
cally connected to the joystick connector as
illustrated in Figure 5. 2. All reads of the Receive Port, MPUbase+0,
return the next byte in the receive buffer
FIFO. When serial data is received from the
MPU-401 "UART" Mode Operation
MIDIN pin, it is placed in the next receive
After power-up reset, the interface is in "non- buffer FIFO location. If the buffer is full,
UART" mode. Non-UART mode operation is the last location is overwritten with the new
defined as follows: data. The Status Register, MPUbase+1,
bit 7, RXS is updated to reflect the new re-
1. All writes to the Transmit Port, MPUbase+0, ceive buffer FIFO state.
are ignored.
3. A write to the Command Register,
2. All reads of the Receive Port, MPUbase+0, MPUbase+1, of FFh will return the interface
return the last received buffer data. to non-UART mode.

3. All writes to the Command Port, MPUbase+1, 4. All other writes to the Command Register,
are monitored and acknowledged as follows: MPUbase+1, are ignored.
a. A write of 3Fh sets the interface into
UART operating mode. An acknowledge FM SYNTHESIZER
is generated by putting an FEh into the
receive buffer FIFO which generates an A games-compatible internal FM synthesizer is
interrupt. included which responds to both the SBPro FM
synthesis addresses as well as the SYNbase ad-
b. A write of A0-A7, ABh, ACh, ADh, AFh dresses.
places an FEh into the receive buffer
FIFO (which generates an interrupt) fol- To enable the internal FM synthesis engine, the
lowed by a one byte write to the receive IFM bit in the Hardware Configuration data,
buffer FIFO of 00h for A0-A7, and ABh byte 8 (Global Configuration Byte) must be set.
commands, 15h for ACh, 01h for ADh, This bit is also available in WSS register X4.
and 64h for AFh commands.
Volume control for the internal FM synthesizer is
c. All other writes to the Command Port are
supported through I18 and I19 in the WSS ex-
ignored and an acknowledge is gener-
tended register space.
ated by putting an FEh into the receive
buffer FIFO which generates an interrupt.
The synthesizer interface is compatible with the
Adlib and Sound Blaster standards. The typical
Adlib I/O address is SYNbase = 388h.

DS252PP2 63
CS4235
TM
CrystalClear Low Cost ISA Audio System

Standard Synthesizer I/O Map will respond to is programmable via the Hard-
Address Name Type ware Configuration data, byte 5, from one to
SYNbase+0 FM Status Read Only eight bytes (default = 1 byte).
SYNbase+0 FM Address 0 Write Only
SYNbase+1 FM Data 0 Read/Write To make the CDROM interface more flexible,
SYNbase+2 FM Address 1 Write Only one global bit, located in the Hardware Configu-
SYNbase+3 FM Data 1 Read/Write ration data section - byte 7, allow control over
the polarity of the CDROM interrupt pin
CDROM INTERFACE CDINT. IHC defaults to 1 indicating that CDINT
An IDE CDROM controller interface is provided is an active high interrupt. IHC is also control-
that supports Enhanced as well as Legacy IDE lable through CTRLbase+1.
CDROM drives. This interface includes two pro-
grammable chip selects and on-chip hardware to CS4610 DSP SERIAL DATA PORT
map DMA and interrupt signals to the ISA bus. The WSS Codec includes a CS4610 DSP serial
Use of the CDROM interface requires an exter- audio interface for transferring digital audio data
nal 1k E2PROM to support CDROM between the part and the CS4610 DC ’97 Audio
Plug-and-Play, Hardware Configuration, and Accelerator serial device. When SPE is set
firmware patch data. (MCE must be 1 to change SPE), the serial port
pins are enabled; otherwise, they are high-im-
There are five pins that make up the CDROM pedance pins.
interface which consist of:
The DSP audio serial port is software enabled
CDCS - chip select, COMbase address via the SPE bit in the WSS Codec indirect regis-
CDINT - interrupt, COMint ter I16 or from the Hardware Configuration data
CDRQ - DMA request, COMdma in the EEPROM. The ISA interface is fully ac-
CDACK - DMA acknowledge, COMdma tive in this mode. The serial port data format is
ACDCS - alternate chip select, ACDbase always two’s complement 16-bit linear.

The four basic CDROM interface pins are multi- FSYNC and SCLK are always output from the
function pins that default to the upper address part when the serial port is enabled. The serial
bits SA12 - SA15. To use the pins as a CDROM port can be configured in one of four serial port
interface, a 10 kΩ pulldown resistor must be formats, shown in Figures 6-9. SF1 and SF0 in
placed on MCLK. I16 select the particular format. MCE in R0 must
be set to change SF1/0. Both left and right audio
The fifth CDROM pin ACDCS is multiplexed words are always 16 bit two’s complement.
with XCTL1/SINT/DOWN. This chip select sup- When the mono audio format is selected, the
ports the alternate CDROM chip select used for right channel output is set to zero and the left
status. The volume control pin DOWN has the channel input is sent to both DAC channels.
highest precedence; therefore, the VCEN bit
must be zero to use this pin for the CDROM in- The first format - SPF0, shown in Figure 6, is
terface. Given that VCEN is zero, a 10 kΩ called 64-bit enhanced. This format has 64
pulldown resistor on SDOUT converts this pin to SCLKs per frame with a one bit period wide
ACDCS. The range of addresses that ACDCS FSYNC that precedes the frame. The first 16 bits
occupy the left word and the second 16 bits oc-

64 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

FSYNC

SCLK ...

SDOUT 15 14 13 12 ... 0 15 14 ... 0 8 zeros INT 7 zeros CEN PEN OVR 13 zeros

16 Bits 16 Bits 32 Bits


Left Data Right Data

SDIN 15 14 13 12 ... 0 15 14 ... 0

16 Bits 16 Bits INT = Interrupt Bit


Left Data Right Data CEN = Capture Enable
PEN = Playback Enable
OVR = Left Overrange or
Right Overrange

Figure 6. 64-bit Enhanced Mode (SF1,0 = 00)

FSYNC

SCLK ... ...

SDOUT/ 15 14 13 ... 0 15 14 13 ... 0 15


SDIN
16 Clocks 16 Clocks 16 Clocks 16 Clocks
Left Data Right Data

Figure 7. 64-bit Mode (SF1,0 = 01)

FSYNC

SCLK ... ... 32 No-Clock bit periods

SDOUT/ 15 14 13 ... 0 15 14 13 ... 0 15 14


SDIN ...

16 Clocks 16 Clocks
Left Data Right Data Left Data

Figure 8. 32-bit Mode (SF1,0 = 10)

DS252PP2 65
CS4235
TM
CrystalClear Low Cost ISA Audio System

cupy the right word. The last 32 bits contain four The fourth serial format - SPF3, shown in Fig-
status bits and 28 zeros. This is the only mode ure 9, is called ADC/DAC mode. This format
that contains status information. has 64 SCLKs per frame, with FSYNC high
transitions at the start of the left ADC data word
The second serial format - SPF1, shown in Fig- and low transitions at the start of the right ADC
ure 7, is called 64-bit mode. This format has 64 data word. For serial data in, SDIN, both the left
SCLKs per frame, with FSYNC high transitions and right 16-bit DAC data word should be fol-
at the start of the left data word and low transi- lowed by zeros. For serial data out, SDOUT,
tions at the start of the right data word. Both the both the left and right ADC data words are fol-
left and right data words are followed by 16 ze- lowed by 16 bits of the DAC data words. The
ros. DAC data words are tapped off the data stream
right before the data enters the Codec DACs.
The third serial format - SPF2, shown in Fig- Having the ADC and DAC data on the SDOUT
ure 8, is called 32-bit mode. This format has 32 allows external modem DSPs to cancel the local
SCLKs per frame and FSYNC is high for the audio source from the local microphone signal.
left channel and low for the right channel. The
absolute time is similar to the other two modes CS9236 WAVETABLE SERIAL PORT
but SCLK is stopped after the right channel is A digital interface to the Cirrus CS9236 Single-
finished. SCLK is held stopped until the start of Chip Wavetable Music Synthesizer is provided
the next frame (stopped for 32 bit period times). that allows the CS9236 PCM audio data to be
This mode is useful for DSPs that do not want summed digitally into the output digital mixer.
the interrupt overhead of the 32 unused bit peri- This serial port is enabled via the WTEN bit lo-
ods. As an example, if a DSP serial word length cated in Control register C8/X24 or in the Global
is 16 bits, then four interrupts will occur in SPF0 Configuration byte in the Hardware Configura-
and SPF1 modes. In mode SPF2 the DSP will tion data. The hardware connections to the
only be interrupted twice. CS9236 are illustrated in Figure 10.

FSYNC

SCLK ... ...

SDIN 15 14 13 ... 0 15 14 13 ... 0 15

DAC 16 Clocks DAC 16 Clocks

SDOUT 15 14 13 ... 0 15 14 13 ... 0 15 14 13 ... 0 15 14 13 ... 0 15

ADC 16 Clocks DAC 16 Clocks ADC 16 Clocks DAC 16 Clocks


Left Data Right Data

Figure 9. ADC/DAC Mode (SF1,0 = 11)

66 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

The completion of calibration can be determined


100 Ω CS9236
by polling the Auto-Calibrate In-Progress bit in
MCLK MCLK5I the Error Status and Initialization register (ACI,
LRCLK LRCLK I11). This bit will be high while the calibration is
SDATA
in progress and low once completed. Transfers
SOUT
enabled during calibration will not begin until
BRESET RST the calibration cycle has completed. Since the
part always operates at 44.1 kHz internally, all
PDN
100k Ω 100k Ω calibration times are based on 44.1 kHz sample
MIDOUT MIDI_IN periods.
MIDIN XTAL3I
The Calibration procedure is as follows:

Midi In Midi Out 1) Place the WSS Codec in Mode Change


Enable using the MCE bit of the Index Ad-
Joystick Connector
dress register (R0).
Figure 10. CS9236 Wavetable Serial Port Interface
2) Set the CAL1,0 bits in the Interface Configura-
tion register (I9).
The CS9236 data is sent to DAC2 which can be
summed into the input or output mixer. Volume 3) Return from Mode Change Enable by reset-
control for the serial port is supported through ting the MCE bit of the Index Address
I18 and I19 in the WSS register space. register (R0).

WSS CODEC SOFTWARE DESCRIPTION 4) Wait until 80h NOT returned


The WSS Codec must be in Mode Change En-
able Mode (MCE=1) before any changes to the 5) Wait until ACI (I11) cleared to proceed
Interface Configuration register (I9) or the Sam-
ple Frequency (lower four bits) in the Fs & NO CALIBRATION (CAL1,0 = 00)
Playback Data Format registers (I8) are allowed. This is the fastest mode since no calibration is
The actual audio data formats, which are the up- performed. This mode is useful for games which
per four bits of I8 for playback and I28 for require the sample frequency be changed
capture, can be changed by setting MCE (R0) or quickly. This mode is also useful when the codec
PMCE/CMCE (I16) high. The exceptions are is operating full-duplex and an ADC data format
CEN and PEN which can be changed "on-the- change is desired. This is the only calibration
fly" via programmed I/O writes. All outstanding mode that does not affect the DACs (i.e. mute
DMA transfers must be completed before new the DACs). The No Calibration mode takes zero
values of CEN or PEN are recognized. sample periods.

Calibration CONVERTER CALIBRATION (CAL1,0 = 01)


The WSS Codec has four different calibration This calibration mode calibrates the ADCs and
modes. The selected calibration occurs whenever the DACs, but does not calibrate any of the ana-
the Mode Change Enable (MCE, R0) bit goes log mixing channels. This is the second longest
form 1 to 0. calibration mode, taking 321 sample periods at
44.1 kHz. Because the analog mixer is not cali-

DS252PP2 67
CS4235
TM
CrystalClear Low Cost ISA Audio System

brated in this mode, any signals fed through the 1) Place the WSS Codec in Mode Change En-
mixer will be unaffected. The calibration se- able using the MCE bit of the Index Address
quence is as follows: register (R0).
The DACs are muted
The ADCs are calibrated 2) During a single write cycle, change the Clock
The DACs are calibrated Frequency Divide Select (CFS) and/or
The DACs are unmuted Clock 2 Base Select (C2SL) bits of the Fs &
Playback Data Format register (I8) to the de-
DAC CALIBRATION (CAL1,0 = 10) sired value. (The data format may also be
This calibration mode only clears the DACs changed.)
(playback) interpolation filters leaving the ADC
unaffected. This is the second fastest calibration 3) The WSS Codec resynchronizes its internal
mode (no cal. is the fastest) taking 120 sample states to the new frequency. During this time
periods at 44.1 kHz to complete. The calibration the WSS Codec will be unable to respond.
sequence is as follows: Writes to the WSS Codec will not be recog-
The DACs are muted nized and reads will always return the value
The DAC filters are cleared 80 hex.
The DACs are unmuted
4) The host now polls the WSS Codec’s Index
FULL CALIBRATION (CAL1, 0 = 11) Address register (R0) until the value 80 hex
is no longer returned. On slow processor sys-
This calibration mode calibrates all offsets, tems, 80h may go away faster than read
ADCs, DACs, and analog mixers. Full calibra- from software (the software would never see
tion will automatically be initiated on power up it).
or anytime the WSS Codec exits from a full
power down state. This is the longest calibration 5) Once the WSS Codec is no longer responding
mode and takes 450 sample periods at 44.1 kHz to reads with a value of 80 hex, normal op-
to complete. The calibration sequence is as fol- eration can resume and the WSS Codec can
lows: be removed from MCE.
All outputs are muted (DACs and mixer)
The mixer is calibrated A second method of changing the sample fre-
The ADCs are calibrated quency is to disable the sample frequency bits in
The DACs are calibrated I8 (lower four bits) by setting SRE in I22. When
All outputs are unmuted this bit is set, OSM1 and OSM0 in I10, along
with the rest of the bits in I22, are used to set the
Changing Sampling Rate sample frequency. Once enabled, these bits can
The internal states of the WSS Codec are syn- be changed without doing an MCE cycle.
chronized by the selected sampling frequency.
The sample frequency can be set in one of three The third method supports independent sample
fashions. The standard WSS Codec method uses frequencies (Fs) for capture and playback. The
the Fs & Playback Data Format register (I8) to independent sample frequency mode is enabled
set the sample frequency. The changing of either by setting IFSE in X11. Once enabled, the other
the clock source or the clock frequency divide two methods for setting Fs (I8, I10, and I22) are
requires a special sequence for proper WSS disabled. The capture (ADC) Fs is set in X12
Codec operation: and the playback (DAC) Fs is set in X13.

68 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

The 16-bit signed format (also called 16-bit 2’s


Changing Audio Data Formats complement) is the standard method of repre-
In MODE 1, MCE must be used to select the senting 16-bit digital audio. This format gives
audio data format in I8. Since MCE causes a 96 dB theoretical dynamic range and is the
calibration cycle, it is not ideal for full-duplex standard for compact disk audio players. This
operation. In MODE 2 and 3, individual Mode format uses the value -32768 (8000h) to repre-
Change Enable bits for capture and playback are sent maximum negative analog amplitude, 0 for
provided in register I16. MCE (R0) must still be center scale, and 32767 (7FFFh) to represent
used to select the sample frequency, but PMCE maximum positive analog amplitude.
(playback) and CMCE (capture) allow changing
the respective data formats without causing a 8-BIT UNSIGNED
calibration to occur. Setting PMCE (I16) clears The 8-bit unsigned format is commonly used in
the playback FIFO and allows the upper four the personal computer industry. This format de-
bits of I8 to be changed. Setting CMCE (I16) livers a theoretical dynamic range of 48 dB. This
clears the capture FIFO and allows the upper format uses the value 0 (00h) to represent maxi-
four bits of I28 to be changed. mum negative analog amplitude, 128 for center
scale, and 255 (FFh) to represent maximum
Audio Data Formats positive analog amplitude. The 16-bit signed and
The sample frequency is always selected in the 8-bit unsigned transfer functions are shown in
Fs & Playback Data Format register (I8). In Figure 11.
MODE 1 the same register, I8, determines the
audio data format for both playback and capture; DMA Registers
however, in MODE 2 and 3, I8 only selects the The DMA registers allow easy integration of this
playback data format and the capture data format part into ISA systems. Peculiarities of the ISA
is independently selectable in the Capture Data DMA controller require an external count
Format register (I28). mechanism to notify the host CPU of a full
DMA buffer via interrupt. The programmable
The WSS Codec always orders the left channel DMA Base registers provide this service.
data before the right channel. Note that these
definitions apply regardless of the specific for-
mat of the data. For example, the left sample
always comes first in the data stream regardless
of whether the sample is 16-bit or 8-bit in size.

There are two data formats supported by the


WSS Codec: 16-bit signed (little Endian) and 8-
bit unsigned. See Figures 12-15.

16-BIT SIGNED
The 16-bit signed data format is "little Endian".
This format defines the byte ordering of a multi-
byte word as having the least significant byte
occupying the lowest memory address. Likewise,
the most significant byte of a little Endian word
Figure 11. Linear Transfer Functions
occupies the highest memory address.

DS252PP2 69
CS4235
TM
CrystalClear Low Cost ISA Audio System

32-bit Word Time

sample 6 sample 5 sample 4 sample 3 sample 2 sample 1

MONO MONO MONO MONO


31 24 23 16 15 8 7 0

Figure 12. 8-bit Mono, Unsigned Audio Data

32-bit Word Time

sample 3 sample 3 sample 2 sample 2 sample 1 sample 1

RIGHT LEFT RIGHT LEFT


31 24 23 16 15 8 7 0

Figure 13. 8-bit Stereo, Unsigned Audio Data

32-bit Word Time

sample 6 sample 5 sample 4 sample 3 sample 2 sample 1

MONO MONO
31 24 23 16 15 8 7 0

Figure 14. 16-bit Mono, Signed Little Endian Audio Data

32-bit Word Time

sample 3 sample 3 sample 2 sample 2 sample 1 sample 1

RIGHT LEFT
31 24 23 16 15 8 7 0

Figure 15. 16-bit Stereo, Signed Little Endian Audio Data

70 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

The act of writing a value to the Upper Base


register causes both Base registers to load the CAPTURE DMA REGISTERS
Current Count register. DMA transfers are en- The Capture DMA Base registers (I30/31) pro-
abled by setting the PEN/CEN bit while vide a second pair of Base registers that allow
PPIO/CPIO is clear. (PPIO/CPIO can only be full-duplex DMA operation. With full-duplex op-
changed while the MCE bit is set.) Once trans- eration capture and playback can occur
fers are enabled, each sample that is transferred simultaneously. These registers are provided in
by a DMA cycle will decrement the Current MODE 2 and 3 only.
Count register until zero is reached. The next
sample after zero generates an interrupt and re- When the capture Current Count register rolls
loads the Current Count registers with the values under, the Capture Interrupt bit, CI, (I24) is set
in the Base registers. causing the INT bit (R2) to be set. The interrupt
is cleared by a write of any value to the Status
For all data formats the DMA Base registers register (R2), or writing a "0" to the Capture In-
must be loaded with the number of samples, mi- terrupt bit, CI (I24).
nus one, to be transferred between "DMA
Interrupts". A sample is one to four bytes wide WSS Codec Interrupt
and is defined as all data taken at one instant in
time. Stereo and mono data contain the same The INT bit of the Status register (R2) always
number of samples, and 8-bit data and 16-bit reflects the status of the WSS Codec’s internal
data contain the same number of samples. interrupt state. A roll-over from any Current
Symbolically: Count register (DMA playback, DMA capture, or
Timer) sets the INT bit. This bit remains set until
DMA Base register16 = NS - 1 cleared by a write of ANY value to Status regis-
ter (R2), or by clearing the appropriate bit or bits
Where NS is the number of samples transferred (PI, CI) in the Alternate Feature Status register
between interrupts and the "DMA Base regis- (I24).
ter16" consists of the concatenation of the upper
and lower DMA Base registers. The Interrupt Enable (IEN) bit in the Pin Control
register (I10) determines whether the interrupt
PLAYBACK DMA REGISTERS assigned to the WSS Codec responds to the in-
terrupt event. When the IEN bit is low, the
The playback DMA registers (I14/15) are used interrupt is masked and the IRQ pin assigned to
for sending playback data to the DACs in the WSS Codec is held low. However, the INT
MODE 2 and 3. In MODE 1, these registers bit in the Status register (R2) always responds to
(I14/15) are used for both playback and capture; the counter.
therefore, full-duplex DMA operation is not pos-
sible. Error Conditions
When the playback Current Count register rolls Data overrun or underrun could occur if data is
under, the Playback Interrupt bit, PI, (I24) is set not supplied to or read from the WSS Codec in
causing the INT bit (R2) to be set. The interrupt an appropriate amount of time. The amount of
is cleared by a write of any value to the Status time for such data transfers depends on the fre-
register (R2), or writing a "0" to the Playback quency selected within the WSS Codec.
Interrupt bit, PI (I24).
Should an overrun condition occur during data
capture, the last whole sample (before the over-

DS252PP2 71
CS4235
TM
CrystalClear Low Cost ISA Audio System

run condition) will be read by the DMA inter- trol pins affect the master volume control output
face. A sample will not be overwritten while the after the analog output mixer. The UP and
DMA interface is in the process of transferring DOWN pins, when low, increment and decre-
the sample. ment the master volume. These two pins would
use SPST momentary switches. The MUTE pin
Should an underrun condition occur in a play- can either be momentary or non-existent where
back case the last valid sample will be output pressing up and down simultaneously mutes the
(assuming DACZ = 0) to the digital mixer. This output volume. The circuit in Figure 16, contains
will mask short duration error conditions. When optional resistors for EMI and ESD protection;
the next complete sample arrives from the host however, the capacitors are required for switch
computer the data stream will resume on the debounce.
next sample clock.

The overrun and underrun error bits in the Alter-


nate Feature Status register, I24, are cleared by
first clearing the condition that caused the over- UP Up
100 Ω 100 Ω
run or underrun error, followed by writing the DOWN Down
particular bit to a zero. As an example, to clear 100 Ω
the playback underrun bit PU, first a sample MUTE Mute
must be sent to the WSS Codec, and then the PU 10 nF 10 nF 10 nF
GND
bit must be written to a zero.

DIGITAL HARDWARE DESCRIPTION Figure 16. Volume Control Circuit


The best example of hardware connection for the
different sections of this part is the Reference Pressing the up button, increments the volume.
Design Data Sheet. The Reference Design Data Pressing the down button, decrements the vol-
Sheet contains all the schematics, layout plots ume. Holding either of these buttons in the low
and a Bill of Materials; thereby providing a com- state causes the volume to to continue changing.
plete example.
The formats are selected by the VCF1 bit, Hard-
Bus Interface ware Configuration data, Global Config. byte.
The ISA bus interface is capable of driving a When VCF1 = 0, the mute function is a momen-
24mA data bus load and therefore does not re- tary switch (similar to up and down). When
quire any external data bus buffering. See the MUTE goes low the master out volume mutes if
Reference Design Data Sheet for a typical con- it was un-muted and vise-versa (the mute button
nection diagram. alternates between mute and un-mute). If the
master volume is muted and up or down is
Volume Control Interface pressed, the volume automatically un-mutes.
Three hardware master volume control pins are
supported: volume up, volume down, and mute. When VCF1 = 1, the MUTE pin is not used.
Hardware volume control is enabled by setting This is a two-button format where pressing up
the VCEN bit in the Hardware Configuration and down simultaneously mutes the master vol-
data, byte 7 (Misc. Config. Byte). Once VCEN ume. If the master volume is muted and up or
is set, the XTAL1/ACDCS/DOWN pin converts down is individually pressed, the volume auto-
to the volume down function. The volume con- matically un-mutes.
72 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

The two formats listed above as illustrated in pullup resistor. VCEN has the highest prece-
Figure 17. dence and will cause this pin to convert to the
DOWN function whenever VCEN is set.
Up Up

Down Down Reset and Power Down


Mute Mute A RESDRV pin places the part into maximum
GND GND power conservation mode. When RESDRV goes
high, the PnP registers are reset - all logical de-
VCF1 = 0 VCF1 = 1 vices are disabled, all analog outputs are muted,
Figure 17. Volume Control Formats and the voltage reference then slowly decays to
ground. When RESDRV is brought low, an in-
itialization procedure begins which causes a full
Crystal / Clock calibration cycle to occur. When initialization is
completed, the registers will contain their reset
Two pins have been allocated to allow the inter- value and the part will be isolated from the bus.
facing of a crystal oscillator: XTALI and RESDRV is required whenever the part is pow-
XTALO. The crystal should be designed as fun- ered up. The initialization time varies based on
damental mode, parallel resonant, with a load whether an E2PROM is present or not and the
capacitor of between 10 and 20 pF. The capaci- size of the data in the E2PROM. After RESDRV
tors connected to each of the crystal pins should goes low, the part should not be written to for
be twice the load capacitance specified to the approximately 200 ms to guarantee that the part
crystal manufacturer. is ready to respond to commands. The exact tim-
ing is specified in the Timing Section in the front
An external CMOS clock may be connected to of this data sheet.
the crystal input XTALI in lieu of the crystal.
When using an external CMOS clock, the Software low-power states are available through
XTALO pin must be left floating with no trace bits in the Control or WSS logical device regis-
or external connection of any kind. ter space. See the CONTROL INTERFACE
section for more information.
General Purpose Output Pins
Two general purpose outputs are provided to en- Address Port Configuration
able control of external circuitry (i.e. mute The part provides a method for motherboards to
function). XCTL1 and XCTL0 in the WSS hide the part from standard PnP (or traditional
Codec register I10 are output directly to the ap- Crystal Key) software. BIOSes can use this
propriate pin when enabled. method to set the part at a unique address, and
report the device as a System Dev. Node to the
Pin XCTL1/ACDCS/DOWN is initially control- operating system.
led by the VCEN bit in the Hardware
Configuration data. If VCEN is zero, this pin be- On the high to low transition of the RESDRV
comes XCTL1 if the SDOUT pin is sampled pin, the part samples the state of the APSEL and
high during a high-to-low transition of RESDRV.
SCL, which have internal 100 kΩ pullups to
This pin can also output ACDCS if the SDOUT
+5 V. APSEL selects the Address Port used to
pin is sampled low during a high-to-low transi-
configure the part. When APSEL is left high, the
tion of the RESDRV pin. SDOUT has an internal
Address Port is 0x279 and backwards compat-
ible to previous chips and standard PnP software.

DS252PP2 73
CS4235
TM
CrystalClear Low Cost ISA Audio System

When APSEL is externally tied to SGND, the ANALOG HARDWARE DESCRIPTION


Address Port is moved to one of two locations, The analog hardware consist of an MPC
selected by a strapping option on the SCL pin. If Level 3-compatible mixer. This section describes
SCL is sampled high (default), then the Address the analog hardware needed to interface with
Port is moved to 0x308. If SCL is strapped low these pins.
with an external 10 kΩ resistor to SGND, the
Address Port is moved to 0x388. Line-Level Inputs
The analog inputs consist of three stereo analog
If the Address Port is moved (APSEL = 0) then
inputs, and one mono input. As shown in Fig-
the device is no longer PnP compliant; however,
ure 4, the input to the ADCs comes from the
it will still respond to all the standard PnP com-
Input Mixer that selects any combination of the
mands using the new Address Port. In addition,
following: AUX1, AUX2, MIC, DAC1, DAC2,
the new Address Port supports the traditional
and the output from the analog output mixer.
Crystal Key or the new Crystal Key 2.
Unused analog inputs should be connected to-
gether and then connected through a capacitor to
Multiplexed Pin Configuration
analog ground.
On the high to low transition of the RESDRV
pin, the part samples the state of the MCLK and The analog input interface is designed to accom-
SDOUT which have internal 100 kΩ pullups to modate two stereo inputs and two mono inputs.
+5 V. Three of these sources are mixed to the ADC.
These inputs are: a mono microphone input
The state of MCLK at the time RESDRV is (MIC), a stereo CD-ROM input (AUX2), and a
brought low determines the function of the stereo auxiliary line-level input (AUX1). The
CDROM interface pins. If MCLK is sampled MIC, AUX1, and AUX2 inputs have paths after
high, then CDCS, CDACK, CDINT, CDRQ are their volume controls, to the output mixer. The
used to input SA12, SA13, SA14, SA15 respec- output mixer has the additional input of a mono
tively. If MCLK is sampled low (external input channel. All audio inputs should be capaci-
pulldown) then CDCS, CDACK, CDINT, CDRQ tively coupled.
become the standard CDROM interface pins.
Since some analog inputs can be as large as
The XCTL1/ACDCS/DOWN pin state is first 2 VRMS, the circuit shown in Figure 18 can be
determined by VCEN. If VCEN is set this pin is used to attenuate the analog input to 1 VRMS
forced to the DOWN volume control pin. If which is the maximum voltage allowed for the
VCEN is zero, then a strapping option on line-level inputs.
SDOUT determines the pin function. If SDOUT
is high (default) on powerup, the pin is forced to 6.8 kΩ 1.0 µF
the XCTL1 general purpose output that tracks R
the bit by the same name in I10 in the WSS 1.0 µF
L
space. If SDOUT is externally pulled low
6.8 kΩ
through a 10 kΩ resistor, then the pin is forced 6.8 kΩ
6.8 kΩ
to the alternate CDROM chip select function,
ACDCS.
Figure 18. Line Inputs

74 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

The AUX2 line-level inputs have an extra pin,


2 kΩ
CMAUX2, which provides a pseudo-differential 47 kΩ
input for both LAUX2 and RAUX2. This pin VREF
+
takes the common-mode noise out of the AUX2 47 kΩ 1 µF
inputs when connected to the ground coming MC33078 or
MC33178
from the AUX2 analog source. Connecting the 0.1 µF
0.33 µF
AUX2 pins as shown in Figure 19 provides extra MIC
noise attenuation coming from the CDROM X7R
4.7 kΩ
drive, thereby producing a higher quality signal.
Since the better the resistors match, the better the 2.7 nF
common-mode attenuation, one percent resistors NPO
are recommended. If CMAUX2 is not used, it 600 Ω
+
should be connected through an AC cap to ana- 10 µF
log ground.
Figure 20. Microphone Input
(All resistors 1%)
6.8 kΩ MIMR bits support muting the input to the left
1.0 µF
RAUX2 and right channels respectively. Figure 21 illus-
3.4 kΩ 2.0 µF trates a typical input circuit for the Mono In. If
CMAUX2
LAUX2 MIN is driven from a CMOS gate, the 4.7 kΩ
6.8 kΩ 1.0 µF should be tied to AGND instead of VA+. Al-
6.8 kΩ 3.4 kΩ 6.8 kΩ though this input is described for a low-quality
beeper, the input is of the same high-quality as
all other analog inputs and may be used for other
Figure 19. Differential CDROM In purposes.
+5VA (Low Noise) or
Microphone Level Input AGND - if CMOS Source
The microphone level input, MIC, include a se-
lectable -22.5 dB to +22.5 dB gain stage for 4.7 kΩ
interfacing to an external microphone. An addi- 1 47 kΩ
MIN
tional 20 dB gain block is also available. The 0.1 µF
20 dB gain block can be switched off to provide 2.7 nF
another mono line-level input. Figure 20 illus-
trates a single-ended microphone input buffer
circuit that will support lower gain mics. The cir- Figure 21. Mono Input
cuit in Figure 20 supports dynamic mics and
phantom-powered mics that use the ring portion Line Level Outputs
of the jack for power. The analog output section provides a stereo line-
level output. The other output types (headphone
Mono Input and speaker) can be implemented with external
The mono input, MIN, is useful for mixing the circuitry. LOUT and ROUT outputs should be
output of the "beeper" (timer chip), provided in capacitively coupled to external circuitry. Both
all PCs, with the rest of the audio signals. The LOUT and ROUT need 1000 pF NPO capacitors
MIN pin can be mixed into the output mixer between the pin and AGND.
with at a 0 or -9 dB level. Also, the MIM and

DS252PP2 75
CS4235
TM
CrystalClear Low Cost ISA Audio System

the digital ground plane to minimize coupling


Miscellaneous Analog Signals into the analog section. Figure 24 shows the rec-
The VREF pin is typically 2.2 V and provides a ommended positioning of the decoupling
common mode signal for single-supply external capacitors. The capacitors must be on the same
circuits. VREF only supports light DC loads and layer as, and close to, the part. The vias shown
should be buffered if AC loading is needed. For go through to the ground and power plane lay-
typical use, a 0.1 µF in parallel with a 10 µF ca- ers. Vias and power supply traces should be as
pacitor should be connected to VREF. large as possible to minimize the impedance.

GROUNDING AND LAYOUT POWER SUPPLIES


Figure 22 is a suggested layout for motherboard The power supply providing analog power
designs and Figure 23 is a suggested layout for should be as clean as possible to minimize cou-
add-inn cards. For optimum noise performance, pling into the analog section and degrading
the device should be located across a split ana- analog performance.
log/digital ground plane. The digital ground
plane should extend across the ISA bus pins as The VD1 is isolated from the rest of the power
well as the internal digital interface pins. supply pins and provide digital power for the
DGND1 is ground for the data bus and should asynchronous parallel ISA bus. The VD1 pin can
be electrically connected to the digital ground be connected directly to the system digital power
plane which will minimize the effects of the bus supply.
interface due to transient currents during bus
switching. SGND1-4 should also be connected to

Di Crystal Analog
g it
al Part Ground
Gr
o un
d No
1

ise

Digital Digital Ground Noise


Ground

Power
e
Nois Connector
d
un
G ro
al
igi t
D

Figure 22. Suggested Motherboard Layout

76 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

Speaker Out CD-ROM

Speaker In

Analog Ground

Crystal
Part
1

Digital Ground

Figure 23. Suggested Add-In Card Layout

1µF
PIN 80 +
AGND PIN 79
PIN 98 .1µF PIN 97 PIN 81
VDF3 SGND3 .1µF REFFLT
VA .1µF
PIN 1

Analog PIN 71
TEST

PIN 66
SGND2

.1µF
Digital
PIN 17
VDF1 PIN 65
VDF2
= vias through to
power/ground plane
.1µF

PIN 18
SGND1

PIN 53
SGND4

PIN 45 PIN 46
VD1 DGND1
.1µF

Figure 24. Recommended Decoupling Capacitor Positions

DS252PP2 77
CS4235
TM
CrystalClear Low Cost ISA Audio System

VDF1 through VDF3 provide power to internal


digital sections of the codec and should be qui-
eter than VD1. This can be achieved by using a
ferrite bead to the VD1 supply.

VA provides power to the sensitive analog sec-


tions of the chip and should have a clean,
regulated supply to minimize power supply cou-
pled noise in the analog inputs and outputs.

ADC/DAC FILTER RESPONSE PLOTS


Figures 25 through 30 show the overall fre-
quency response, passband ripple, and transition
band for the ADCs and DACs. Figure 31 shows
10
the DACs’ deviation from linear phase. Since the 0
filter response scales based on sample frequency -10
selected, all frequency response plots x-axis are -20
shown from 0 to 1, where 1 is equivalent to Fs. -30
Magnitude (dB)

Therefore, for any given sample frequency, mul- -40


tiply the x-axis values by the sample frequency -50
selected to get the actual frequency. -60

-70

-80

-90

-100
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Input Frequency ( x Fs)

Figure 25. ADC Filter Response

0.2 0

0.1 -10

0.0 -20

-0.1 -30
Magnitude (dB)
Magnitude (dB)

-0.2 -40

-0.3 -50

-0.4 -60

-0.5 -70

-0.6 -80

-0.7 -90

-0.8 -100
0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.40 0.45 0.50 0.55 0.60 0.65 0.70
Input Frequency ( x Fs) Input Frequency ( x Fs)

Figure 26. ADC Passband Ripple Figure 27. ADC Transition Band

78 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

10 0.2

0 0.1
-10 0.0
-20
-0.1

Magnitude (dB)
Magnitude (dB)

-30
-0.2
-40
-0.3
-50
-0.4
-60
-0.5
-70

-80 -0.6

-90 -0.7

-100 -0.8
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50
Input Frequency ( x Fs) Input Frequency ( x Fs)

Figure 28. DAC Filter Response Figure 29. DAC Passband Ripple

0 2.0

-10
1.5
-20
1.0
-30
∆ Phase (degrees)
Magnitude (dB)

0.5
-40

-50 0.0

-60 -0.5
-70
-1.0
-80
-1.5
-90

-100 -2.0
0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50
Input Frequency ( x Fs) Input Frequency ( x Fs)

Figure 30. DAC Transition Band Figure 31. Deviation from Linear Phase

DS252PP2 79
CS4235
TM
CrystalClear Low Cost ISA Audio System

PIN DESCRIPTIONS

SA13*/CDACK
SA14*/CDINT
SA15*/CDRQ
SA12*/CDCS

RESDRV
CMAUX2

REFFLT
SGND3

RAUX2
APSEL

AGND
LAUX2
XTALO

FLT3D
MUTE

VREF
VDF3
XTALI

FLTO
FLTI
MIC
MIN

VA
98
97
96
95
94
93
92
91
90
89
88
87
99

86
85
84
83
82
81
100

76
77
80
79
78
SDATA 1 75 LAUX1
LRCLK 2 74 RAUX1
MCLK 3 73 LOUT
FSYNC 4 72 ROUT
SDOUT 5 71 TEST
SDIN 6 70 JAB1
SCLK 7 69 JBB1
SDA 8 68 JACX
UP 9 67 JBCX
CS4235

10 66 SGND2
11 65 VDF2
100-PIN

XCTL0 12 64 JBCY
TQFP

13 63 JACY
SCL 14 62 JBB2
BRESET 15 61 JAB2
XCTL1*/ACDCS/DOWN 16 60 MIDOUT
VDF1 17 59 MIDIN
SGND1 18 58 DACKA (DACK0*)
(INT15*) IRQF 19 57 DACKC (DACK3*)
(INT12*) IRQE 20 56 DACKB (DACK1*)
(INT11*) IRQD 21 55 DRQA (DRQ0*)
(INT9*) IRQC 22 54 IRQG (INT10)
(INT7*) IRQB 23 53 SGND4
(INT5*) IRQA 24 52 DRQC (DRQ3*)
(TOP VIEW)
SA0 25 51 DRQB (DRQ1*)
36
37
30
31
32

34
35

38

40
41
26

28
29

33

39

42

47
27

44
43

45
46

49
48

50
IOCHRDY
SA11

AEN
IOR

SD6
SD7
SD0

SD5
SD3

SD4
SA6
SA7

SD2
SA8
SA9

SD1
SA10

VD1
SA1
SA2
SA3
SA4
SA5

IOW

DGND1

* Defaults - See individual pin descriptions for more details

80 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

ISA Bus Interface Pins

SA<11:0> - System Address Bus, Inputs


These signals are decoded during I/O cycles to determine access to the various functional
blocks within the part as defined by the configuration data written during a Plug and Play
configuration sequence.

SA<15:12> - Upper System Address Bus, Inputs


These signals are multi-function pins, shared with the CDROM, that default to the upper
address bits SA12 through SA15. These pins are generally used for motherboard designs that
want to eliminate address decode aliasing. Using these pins as upper address bits forces the part
to only accept valid address decodes when A12-A15 = 0. If these pins are not used for address
decodes or for CDROM support, they should be tied to SGND. These pins are forced to the
CDROM interface when a 10 kΩ resistor is placed on pin MCLK to SGND.

SD<7:0> - System Data Bus, Bi-directional, 24 mA drive


These signals are used to transfer data to and from the part.

AEN - Address Enable, Input


This signal indicates whether the current bus cycle is an I/O cycle or a DMA cycle. This signal
is low during an I/O cycle and high during a DMA cycle.

IOR - Read Command Strobe, Input


This active low signal defines a read cycle to the part. The cycle may be a register read or a
read from the part’s DMA registers.

IOW - Write Command Strobe, Input


This active low signal indicates a write cycle to the part. The cycle may be a write to a control
register or a DMA register.

IOCHRDY - I/O Channel Ready, Open Drain Output, 8 mA drive


This signal is driven low by the part during ISA bus cycles in which the part is not able to
respond within a minimum cycle time. IOCHRDY is forced low to extend the current bus
cycle. The bus cycle is extended until IOCHRDY is brought high.

DRQ<A,B,C> - DMA Requests, Outputs, 24 mA drive


These active high outputs are generated when the part is requesting a DMA transfer. This signal
remains high until all the bytes have been transferred as defined by the current transfer data
type. The DRQ<A,B,C> outputs must be connected to 8-bit DMA channel request signals only.
The defaults on the ISA bus are DRQA = DRQ0, DRQB = DRQ1, and DRQC = DRQ3. The
defaults can be changed by modifying the Hardware Resource data.

DS252PP2 81
CS4235
TM
CrystalClear Low Cost ISA Audio System

DACK<A,B,C> - DMA Acknowledge, Inputs


The assertion of these active low signals indicate that the current DMA request is being
acknowledged and the part will respond by either latching the data present on the data bus
(write) or putting data on the bus (read). The DACK<A,B,C> inputs must be connected to 8-bit
DMA channel acknowledge lines only. The defaults on the ISA bus are DACKA = DACK0,
DACKB = DACK1, and DACKC = DACK3. The defaults can be changed by modifying the
Hardware Resource data.

IRQ <A:G>- Host Interrupt Pins, Outputs, 24 mA drive


These signals are used to notify the host of events which need servicing. They are connected to
specific interrupt lines on the ISA bus. The IRQ<A:G> are individually enabled as per
configuration data that is generated during a Plug and Play configuration sequence. The defaults
on the ISA bus are IRQA = INT5, IRQB = INT7, IRQC = INT9, IRQD = INT11,
IRQE = INT12, IRQF = INT15. IRQG is new to the CS4235 and defaults to unconnected for
compatibility reasons. For new designs, IRQG is typically connected to IRQ10. The defaults
can be changed by modifying the Hardware Configuration data loaded from the E2PROM.

RESDRV - Reset Drive, Input


Places the part in lowest power consumption mode. All sections of the part are shut down and
consuming minimal power. The part is reset and in power down mode when this pin is logic
high. The falling edge also latches the state of MCLK and SCLK to determine the functionality
of dual mode pins, and SCL to determine the Address Port. This signal is typically connected to
the ISA bus signal RESDRV. RESDRV must be asserted whenever the part is powered up to
initialize the internal registers to a known state. This pin, when high, also drives the BRESET
pin low.

Analog Inputs

MIC - Mic Input


Microphone input centered around VREF. A programmable gain block provides volume control
and is located in X2 with mutes located in X2 and X3.

LAUX1 - Left Auxiliary #1 Input


Nominally 1 VRMS max analog input for the Left AUX1 channel, centered around VREF. A
programmable gain block provides volume control and is located in I2. Typically used for an
external Left line-level input.

RAUX1 - Right Auxiliary #1 Input


Nominally 1 VRMS max analog input for the Right AUX1 channel, centered around VREF. A
programmable gain block provides volume control and is located in I3. Typically used for an
external Right line-level input.

82 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

LAUX2 - Left Auxiliary #2 Input


Nominally 1 VRMS max analog input for the Left AUX2 channel, centered around VREF. A
programmable gain block provides volume control and is located in I4. Typically used for the
Left channel CDROM input.

RAUX2 - Right Auxiliary #2 Input


Nominally 1 VRMS max analog input for the Right AUX2 channel, centered around VREF. A
programmable gain block provides volume control and is located in I5. Typically used for the
Right channel CDROM input.

CMAUX2 - Common Mode Auxiliary #2 Input


Common mode ground input for the LAUX2 and RAUX2 inputs. Typically connected to the
CDROM ground input to provide common-mode noise rejection. The impedance on this pin
should be one half the impedance on the LAUX2 and RAUX2 inputs.

MIN - Mono Input


Nominally 1 VRMS max analog input, centered around VREF, that goes through a
programmable gain stage (I26) into both channels of the output mixer. This is a general purpose
mono analog input that is normally used to mix the typical "beeper" signal on most computers
into the audio system.

REFFLT - Reference Filter, Input


Voltage reference used internal to the part. A 0.1 µF and a 1 µF capacitor with short fat traces
must be connected between this pin and AGND. No other connections should be made to this
pin.

Analog Outputs

LOUT - Left Line Level Output


Analog output from the mixer for the left channel. Nominally 1 VRMS max centered around
VREF. A 1000 pF NPO capacitor must be attached from this pin to AGND.

ROUT - Right Line Level Output


Analog output from the mixer for the Right channel. Nominally 1 VRMS max centered around
VREF. A 1000 pF NPO capacitor must be attached from this pin to AGND.

FLT3D - 3D Filter
A 0.01 µF capacitor must be attached from this pin to AGND.

FLTO - Filter Output


A 1000 pF NPO capacitor must be attached between this pin and FLTI.

DS252PP2 83
CS4235
TM
CrystalClear Low Cost ISA Audio System

FLTI - Filter Input


A 1000 pF NPO capacitor must be attached between this pin and FLTO.

VREF - Voltage Reference, Output


All analog inputs and outputs are centered around VREF which is nominally 2.1 Volts. This
pin may be used to level shift external circuitry, although any AC loads should be buffered.

MIDI Interface

MIDOUT - MIDI Out Transmit Data, Output, 4 mA drive


This output is used to send MIDI data serially out to a external MIDI device. Normally
connected to pin 12 of the joystick connector for use with breakout boxes.

MIDIN - MIDI In Receive Data, Input - Internal Pullup


This input is used to receive serial MIDI data from an external MIDI device. This pin should be
connected to pin 15 of the joystick connector for use with breakout boxes.

External Peripheral Signals

SDA - E2PROM Data Pin, Bi-directional, Open Drain, 4 mA sink


This open-drain pin must have an external pullup (3.3 kΩ) and is used in conjunction with SCL
to access an external serial E2PROM. When an E2PROM is used, the SDA pin should be
connected to the data pin of the E2PROM device and provides a bi-directional data port. The
E2PROM is used to set the Plug and Play resource data.

SCL - E2PROM Serial Clock, Output, 4 mA drive (Address Port Selection)


When E2PROM access is enabled, via EEN in CTRLbase+1, then SCL is used as a clock
output to the E2PROM. At power-up, this pin is an input (with an internal 100 kΩ pullup) that
selects between two alternate addresses for the Address Port used to configure the chip.
Assuming APSEL is strapped low, SCL high selects 308h as the Address Port, and when SCL is
tied low (with a 10 kΩ resistor to ground), the Address Port is 388h.

XCTL0 - External Control, Output, 4 mA drive


This pin is a general purpose output pin controlled by the XCTL0 bit in the WSS register I10.

BRESET - Buffered Reset, Output, 4 mA drive


This active low signal goes low whenever the RESDRV pin goes high. This pin is also software
controllable through the BRES bit in register C8 in the Control Logical Device space. BRES
provides a software power down and reset control over devices connected to the CS4235 such
as the CS9236 Single-Chip Wavetable Music Synthesizer.

84 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

Joystick Interface

JACX, JACY - Joystick A Coordinates, Input


These pins are the X/Y coordinates for Joystick A. They should have a 5.6 nF capacitor to
ground and a 2.2 kΩ resistor to the joystick connector pins 3 and 6, respectively.

JAB1, JAB2 - Joystick A Buttons, Input - Internal Pullups


These pins are the switch inputs for Joystick A. They should be connected to joystick connector
pins 2 and 7, respectively; as well as have a 1 nF capacitor to ground.

JBCX, JBCY - Joystick B Coordinates, Input - Internal Pullups


These pins are the X/Y coordinates for the second joystick, Joystick B. They should have a
5.6 nF capacitor to ground and a 2.2 kΩ resistor to the joystick connector pins 11 and 13,
respectively.

JBB1, JBB2 - Joystick B Buttons, Input


These pins are the switch inputs for the second joystick, Joystick B. They should be connected
to joystick connector pins 10 and 14, respectively; as well as have a 1 nF capacitor to ground.

CS4610 DSP Serial Port Interface

FSYNC - Frame Sync, Output, 4 mA drive


When the serial port is enabled, SPE = 1 in I16, this pin is the serial frame sync output.

SCLK - Serial Clock, Output, 4 mA drive


When the serial port is enabled, SPE = 1 in I16, this pin is the serial clock output.

SDOUT - Serial Data Output, Output, 4 mA drive (Alternate CDROM Chip Select Enable)
When the serial port is enabled, SPE = 1 in I16, this pin is the serial data output. At power-up,
this pin is an input (with an internal 100 kΩ pullup) that, when pulled low with a 10 kΩ
resistor to SGND, enables the alternate CDROM chip select pin ACDCS. Loading must be
limited to CMOS inputs if this pin has the 10 kΩ resistor attached.

SDIN - Serial Data Input, Input


When the serial port is enabled, SPE = 1 in I16, this pin is the serial data input.

CS9236 Wavetable Serial Port Interface


A digital interface to the CS9236 Single-Chip Wavetable Music Synthesizer is provided that
allows the CS9236 PCM audio data to be summed on the CS4235 without the need for an
external DAC. This serial port is enabled via the WTEN bit which is located in the Global
Configuration byte in the E2PROM Hardware Configuration data, or C8.

DS252PP2 85
CS4235
TM
CrystalClear Low Cost ISA Audio System

SDATA - Wavetable Serial Audio Data, Input


This input supplies the serial audio PCM data to be mixed to the stereo DAC2 of the CS4235.
The data consists of left and right channel 16-bit data delineated by LRCLK. This pin should be
connected to the SOUT output pin on the CS9236. This pin should also have a weak pull-down
resistor of approx. 100 kΩ to minimize power-down currents and allow for stuffing options.

LRCLK - Wavetable Serial Left/Right Clock, Input


This input supplies the serial data alignment signal that delineates left from right data. This pin
should be connected to the LRCLK output pin on the CS9236. This pin should also have a
weak pull-down resistor of approx. 100 kΩ to minimize power-down currents and allow for
stuffing options.

MCLK - Wavetable Master Clock, Output (CDROM enable)


This output supplies the 16.9344 MHz master clock that controls all the timing on the CS9236.
This pin should be connected to the MCLK5I input pin on the CS9236. MCLK can be disabled
in software using the DMCLK bit in C8 in the Control logical device space. DMCLK provides
a partial software power-down mode for the CS9236. At power-up, this pin is an input (with an
internal 100 kΩ pullup) that, when pulled low with a 10 kΩ resistor to SGND, enables the
CDROM interface (over the upper four ISA address pins).

CDROM Interface
The four CDROM pins are multi-function and default to ISA upper address bits SA12-SA15.
To enable the CDROM port, an external 10 kΩ resistor must be tied between MCLK and
SGND. MCLK is sampled on the falling edge of RESDRV. The alternate CDROM chip select
has its own strapping option to enable ACDCS. Use of the CDROM interface requires a 1 k
E2PROM to support the Plug-and-Play data as well as firmware patch data.

CDCS - CDROM Chip Select, Output, 4 mA drive


This output goes low whenever an address is decoded that matches the value programmed into
the CDROM base address register.

ACDCS - Alternate CDROM Chip Select, Output, 4 mA drive


This pin, XCTL1/ACDCS/DOWN, is multiplexed with two other functions, and defaults to the
XCTL1 output which is controlled by the XCTL1 bit in the WSS I10. This pin can also be
configured at a second CDROM Chip Select, ACDCS, to support the alternate IDE CDROM
decode. To force this pin to the CDROM alternate chip select, an external 10 kΩ resistor must
be tied between SDOUT and SGND. ACDCS output then goes low whenever an address is
decoded that matches the value programmed into the CDROM alternate base address register,
ACDbase. This pin can also be used as the volume up pin DOWN by setting VCEN in Control
register C0 or the Hardware Configuration data. VCEN has the highest precedence over the
other pin functions.

86 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

CDINT - CDROM Interrupt, Input


This pin is used to input an interrupt signal from the CDROM interface. The part can be
programmed, through the plug-and-play resource data, to output this signal to the appropriate
ISA bus interrupt line. The polarity if this input can be programmed through CTRLbase+1
register, bit ICH, or the Hardware Configuration data; the default is active high.

CDRQ - CDROM DMA Request, Input


This pin can be used to input the DMA request signal from the CDROM interface. The part can
be programmed, through the plug-and-play resource data, to output this signal to the
appropriate ISA bus DRQ line.

CDACK- CDROM DMA Acknowledge, Output, 4 mA drive


This pin can be used to output the ISA bus-generated DMA acknowledge signal to the CDROM
interface.

Volume Control
The volume control pins are enabled by setting VCEN in the Hardware Configuration data,
Misc. Hardware Config. byte. The VCF1 bit in the Hardware Configuration data, Global
Configuration byte, set the format for the volume control pins. Typically a 100 Ω series resistor
and a 10 nF capacitor (required) to ground, capacitor on the switch side of the series resistor,
would be included on each pin for ESD protection and to help with EMI emissions.

UP - Volume Up, Input - Internal Pullup


This pin is enabled when VCEN is set. When UP is low, the master volume output is
incremented. A 10 nF capacitor to ground is required for switch debounce.

DOWN - Volume Down, Input - Internal Pullup


The XCTL1/ACDCS/DOWN is a multiplexed pin that can be used as XCTL1, the alternate
CDROM chip select, or the Volume Down pin. This pin is switched to the DOWN function
when VCEN is set. When DOWN is low, the master volume output is decremented. A 10 nF
capacitor to ground is required for switch debounce.

MUTE - Volume Mute, Input - Internal Pullup


The MUTE pin function can be momentary, or non-existent based on the VCF1 bit. The MUTE
function is enabled when VCEN is set. A 10 nF capacitor to ground is required for switch
debounce.

Miscellaneous

XTALI - Crystal Input


This pin will accept either a crystal, with the other pin attached to XTALO, or an external
CMOS clock. XTAL must have a crystal or clock source attached for proper operation. The
crystal frequency must be 16.9344 MHz and designed for fundamental mode, parallel resonance
operation.

DS252PP2 87
CS4235
TM
CrystalClear Low Cost ISA Audio System

XTALO - Crystal Output


This pin is used for a crystal placed between this pin and XTALI. If an external clock is used
on XTALI, this pin must be left floating with no traces or components connected to it.

APSEL - Address Port Select, Input


This pin has an internal pull-up of approximately 100 kΩ. Leaving this pin in its default
condition, places the PnP/Crystal Key Address Port at the standard PnP address of 279h (hex).
For Motherboard applications, APSEL can be tied to SGND, which will change the Address
Port to one of two other addresses, chosen by a strapping option on pin SCL. When RESDRV
goes inactive, pin SCL is forced to an input and sampled. When SCL is sampled high (default),
the Address Port changes to address 308h. When SCL is sampled low, the Address Port changes
to 388h. Add-in cards should leave APSEL unconnected

TEST - Test
This pin must be tied to ground for proper operation.

Power Supplies

VA - Analog Supply Voltage


Supply to the analog section of the codec.

AGND - Analog Ground


Ground reference to the analog section of the codec. This pin should be placed on an analog
ground pin separate from other chip grounds.

VD1 - ISA Digital Supply Voltage


Digital supply for the ISA parallel data bus pins.

DGND1 - ISA Digital Ground


Digital ground reference for the ISA parallel data bus pins. These pins are isolated from the
other grounds and should be connected to the digital ground section of the board (see
Figure 24).

VDF1, VDF2, VDF3 - Digital Filtered Supply Voltage


Digital supply for the internal digital section of the codec (except for the parallel data bus).
These pins should be filtered, using a ferrite bead, from VD1.

SGND1, SGND2, SGND3, SGND4 - Internal Digital Grounds


Ground reference for the internal digital portion of the codec. Optimum layout is achieved by
placing SGND1/2/3/4 on the digital ground plane with the DGND pin as shown in Figure 24.

88 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

PARAMETER DEFINITIONS

Frequency Response
Frequency Response is the deviation in signal level verses frequency. The 0 dB reference point
is 1 kHz. The amplitude corner, Ac, lists the maximum deviation in amplitude above and below
the 1 kHz reference point. The listed minimum and maximum frequencies are guaranteed to be
within the Ac from minimum frequency to maximum frequency inclusive.

Total Dynamic Range


TDR is the ratio of the RMS sum of the lowest obtainable noise floor, in the presence of a
signal, divided by the RMS full-scale signal level. The lowest obtainable noise floor is defined
as the noise floor measured with the attenuation bits for the volume control at full attenuation -
without muting. Measured over a 20 Hz to 20 kHz bandwidth with units in dB FS A. (dB FS is
defined as dB relative to full-scale. The "A" indicates an A weighting filter was used.)

Instantaneous Dynamic Range or Dynamic Range


IDR or DR is the ratio of the RMS sum of the noise floor, in the presence of a signal, divided
by the RMS full-scale signal level, available at any instant in time (no change in gain settings
between measurements). Measured over a 20 Hz to 20 kHz bandwidth with units in dB FS A.
(dB FS is defined as dB relative to full-scale. The "A" indicates an A weighting filter was
used.)

Total Harmonic Distortion plus Noise


THD+N is the ratio of the RMS sum of all non-fundamental frequency components, divided by
the RMS full-scale signal level. Tested using a -3 dB FS input signal. Measured over a 20 Hz to
20 kHz bandwidth with units in dB FS A. (dB FS is defined as dB relative to full-scale. The
"A" indicates an A weighting filter was used.)

Interchannel Isolation
The ratio of signal level on the tested channel divided by the stimulus channel level. For inputs,
the tested input channel is terminated with 50 Ω. For outputs, the tested channel is fed digital
zeros. Units in dB.

Interchannel Gain Mismatch


For the ADCs, the difference in input voltage to get an equal code on both channels. For the
DACs, the difference in output voltages for each channel when both channels are fed the same
code. Units in dB.

PATHS:
A-D-PC: Analog in, through ADC, onto PC bus
PC-D-A: PC bus, through DAC, to analog out
A-A: Analog in to Analog out (analog output mixer)

Detailed information on audio testing and paths can be found in Personal Computer Audio Quality
Measurements document by Dr. Steven Harris and Clif Sanchez, located at the following web address:
http://www.cirrus.com/products/papers/meas/meas.html.

DS252PP2 89
CS4235
TM
CrystalClear Low Cost ISA Audio System

PACKAGE PARAMETERS

D
100-pin TQFP - Package Code ’Q’
D1 Symbol Description MIN NOM MAX
N Lead Count 100
A Overall Height 1.66
A1 Stand Off 0.00
b Lead Width 0.14 0.20 0.26
c Lead Thickness 0.077 0.127 0.177
D Terminal Dimension 15.70 16.00 16.30
D1 Package Body 14.0
E Terminal Dimension 15.70 16.00 16.30
E1 Package Body 14.0
e1 Lead Pitch 0.40 0.50 0.60
E E1 L1 Foot Length 0.30 0.50 0.70
T Lead Angle 0.0° 12.0°

Notes:
1) Dimensions in millimeters.
100

2) Package body dimensions do not include mold protrusion,


1 which is 0.25 mm.
3) Coplanarity is 0.004 in.
4) Lead frame material is AL-42 or copper, and lead finish
is solder plate.
5) Pin 1 identification may be either ink dot or dimple.
L1 e1 b 6) Package top dimensions can be smaller than bottom
dimensions by 0.20 mm.
7) The "lead width with plating" dimension does not include
a total allowable dambar protrusion of 0.08 mm (at
T c maximum material condition).
8) Ejector pin marks in molding are present on every package.
A
A1

90 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

APPENDIX A: DEFAULT PnP DATA

; EEPROM Validation Bytes


DB 055H, 0BBH ; EEPROM Validation Bytes: CS4235

DB 001H ; EEPROM data length upper byte


DB 014H ; lower byte, Listed Size = 276

; Hardware Configuration Data


DB 000H ; ACDbase Addr. Mask Length = 1 bytes
DB 003H ;
DB 080H ; MCB: IHCD
DB 080H ; GCB1: IFM
DB 005H ; Code Base Byte
DB 020H ; FM Scaling 0 dB
DB 004H ; RESERVED
DB 008H ; RESERVED
DB 010H ; RESERVED
DB 080H ; M+DSP: MIM
DB 000H ;
DB 000H ; GCB2: No Bits Set

; Hardware Mapping Data


DB 004H ; CDbase Length = 4
DB 048H ; RESERVED
DB 075H ; IRQ selection A & B - B= 7, A=5
DB 0B9H ; IRQ selection C & D - D=11, C=9
DB 0FCH ; IRQ selection E & F - F=15, E=12
DB 010H ; DMA selection A & B - B= 1, A=0
DB 003H ; DMA C,IRQ G select. - G= 0, C=3

; PnP Resource Header - PnP ID for CS4236 IC, OEM ID = 42


DB 00EH, 063H, 042H, 036H, 0FFH,0FFH,0FFH,0FFH,0A9H ; CSC4236 FFFFFFFF
DB 00AH, 010H, 005H ; PnP version 1.0, Vendor version 0.5
DB 082H, 00EH, 000H, ’Crystal Codec’, 000H ; ANSI ID

; LOGICAL DEVICE 0 (Windows Sound System & SBPro)


DB 015H, 00EH, 063H, 000H, 000H, 000H ; EISA ID: CSC0000

DB 082H, 007H, 000H, ’WSS/SB’, 000H ; ANSI ID


DB 031H, 000H ; DF Best Choice
DB 02AH, 002H, 028H ; DMA: 1 - WSS & SBPro
DB 02AH, 009H, 028H ; DMA: 0,3 - WSS & SBPro capture
DB 022H, 020H, 000H ; IRQ: 5 Interrupt Select 0
DB 047H, 001H, 034H, 005H, 034H, 005H, 004H, 004H ;16b WSSbase: 534
DB 047H, 001H, 088H, 003H, 088H, 003H, 008H, 004H ;16b SYNbase: 388
DB 047H, 001H, 020H, 002H, 020H, 002H, 020H, 010H ;16b SBbase: 220

DB 031H, 001H ; DF Acceptable Choice 1


DB 02AH, 00AH, 028H ; DMA: 1,3 - WSS & SBPro
DB 02AH, 00BH, 028H ; DMA: 0,1,3 - WSS & SBPro capture
DB 022H, 0A0H, 09AH ; IRQ: 5,7,9,11,12,15 Interrupt Select 0

DS252PP2 91
CS4235
TM
CrystalClear Low Cost ISA Audio System

DB 047H, 001H, 034H, 005H, 0FCH, 00FH, 004H, 004H ;16b WSSbase: 534-FFC
DB 047H, 001H, 088H, 003H, 088H, 003H, 008H, 004H ;16b SYNbase: 388
DB 047H, 001H, 020H, 002H, 060H, 002H, 020H, 010H ;16b SBbase: 220-260

DB 031H, 002H ; DF Suboptimal Choice 1


DB 02AH, 00BH, 028H ; DMA: 0,1,3 - WSS & SBPro
DB 022H, 0A0H, 09AH ; IRQ: 5,7,9,11,12,15 Interrupt Select 0
DB 047H, 001H, 034H, 005H, 0FCH, 00FH, 004H, 004H ;16b WSSbase: 534-FFC
DB 047H, 001H, 088H, 003H, 0F8H, 003H, 008H, 004H ;16b SYNbase: 388-3F8
DB 047H, 001H, 020H, 002H, 000H, 003H, 020H, 010H ;16b SBbase: 220-300

DB 038H ; End of DF for Logical Device 0

; LOGICAL DEVICE 1 (Game Port)


DB 015H, 00EH, 063H, 000H, 001H, 000H ; EISA ID: CSC0001

DB 082H, 005H, 000H, ’GAME’, 000H ; ANSI ID


DB 031H, 000H ; DF Best Choice
DB 047H, 001H, 000H, 002H, 000H, 002H, 008H, 008H ;16b GAMEbase: 200

DB 031H, 001H ; DF Acceptable Choice 1


DB 047H, 001H, 008H, 002H, 008H, 002H, 008H, 008H ;16b GAMEbase: 208

DB 038H ; End of DF for Logical Device 1

; LOGICAL DEVICE 2 (Control)


DB 015H, 00EH, 063H, 000H, 010H, 000H ; EISA ID: CSC0010

DB 082H, 005H, 000H, ’CTRL’, 000H ; ANSI ID


DB 047H, 001H, 020H, 001H, 0F8H, 00FH, 008H, 008H ;16b CTRLbase: 120-FF8

; LOGICAL DEVICE 3 (MPU-401)


DB 015H, 00EH, 063H, 000H, 003H, 000H ; EISA ID: CSC0003

DB 082H, 004H, 000H, ’MPU’, 000H ; ANSI ID


DB 031H, 000H ; DF Best Choice
DB 022H, 000H, 002H ; IRQ: 9 Interrupt Select 0
DB 047H, 001H, 030H, 003H, 030H, 003H, 008H, 002H ;16b MPUbase: 330

DB 031H, 001H ; DF Acceptable Choice 1


DB 022H, 000H, 09AH ; IRQ: 9,11,12,15 Interrupt Select 0
DB 047H, 001H, 030H, 003H, 060H, 003H, 008H, 002H ;16b MPUbase: 330-360

DB 031H, 002H ; DF Suboptimal Choice 1


DB 047H, 001H, 030H, 003H, 0E0H, 003H, 008H, 002H ;16b MPUbase: 330-3E0

DB 038H ; End of DF for Logical Device 3

DB 079H, 09AH ; End of Resource Data, Resource Size = 280

92 DS252PP2
CS4235
TM
CrystalClear Low Cost ISA Audio System

APPENDIX B: DIFFERENCES BETWEEN THE CS423xB DEVICES AND THE CS4235

This part is designed to be hardware backwards compatible with some CS423xB designs, primarily
motherbaord applications. New drivers will be needed to support this part.
Hardware Pin Differences:
1. RFILT and LFILT capacitors are no longer needed and should be removed. On the CS4235, these
pins are renamed FLTI and FLTO and should have a capacitor placed between them. They are used
for the Crystal 3D Sound circuitry. Not populating this capacitor will not have any adverse affects
on the part, but will result in non-optimum 3D Sound.
2. The external L/RLINE analog inputs are no longer supported. LLINE is now FLT3D and is used
for the 3D Sound function. A 0.01 µF capacitor should be placed between this pin and analog
ground. When external analog wavetable is desired, the AUX1 analog inputs should be used.
3. The analog microphone inputs are now mono. LMIC is changed to MIC, and RMIC has been re-
moved.
4 Mono Out, MOUT, has been removed. The pin is redefined as APSEL and used to change the Ad-
dress Port. APSEL has an internal pullup, setting the Address Port to 0x279 for backwards
compatibility.
5. VDF4 has been changed to IRQG - a seventh interrupt (typically used for INT 10). The default is
disabled to provide backwards compatibility.
6. The Modem Logical Device has been removed. This includes MCS and MINT.
7. Support for an external synthesizer has been removed. This includes SCS and SINT.
8. The peripheral port has been removed. This includes XD<7:0>, XIOR, XIOW, XA<0:2>. CDROM
applications must now drive the ISA bus directly or through buffers.
9. The hardware strap enable for the CDROM has been moved. CS423xB designs have a pulldown on
XIOR. To support the CDROM interface on the CS4235, the pulldown must be moved to the
MCLK pin. Also, to enable the alternate CDROM chip select pin ACDCS, a pulldown must be
added to pin SDOUT.
10. The DSP serial port is no longer supported as an option on the 2nd Joystick connector. The DSP
port is still located on pins 4 through 7.
11. There is no 3.3 V ISA support.
12. The consumer IEC-958 (S/PDIF) output, supported on the CS4237B and CS4238B, has been re-
moved.
13. Only two modes of Hardware Volume Control are supported: 2-button, and 3-button with momen-
tary mute. In addition, a 10 nF capacitor to ground is required for switch debounce on the CS4235.
14. Pullup resistors have been added to the 4 Joystick Button pins, 3 Hardware Volume Control pins,
and the MIDIN pin.

DS252PP2 93

You might also like