Specifications
ESS Technology, Inc. SAM0025A-062397 51
ES1879 DATA SHEET
PROGRAMMING THE ES1879
PRELIMINARY
Compatibility Mode ADC Operation
ES1879 analog circuitry is switched from the DAC
direction to the ADC direction by the first direct or DMA
mode ADC command (2xh). Discard the first 25 to 100
milliseconds of samples because pops might occur in the
data due to the change from the DAC to ADC direction. In
the ADC direction, the digital audio input to the mixer is
automatically muted.
1. Reset
Write 1h to port Audio_Base+6h.
To play a new sound without resetting the ES1879
beforehand when the status of the analog circuits is not
clear, mute the input to the mixer with command D3h to
prevent pops.
2. Select the input source using register 0Ch
Sound Blaster Pro has three recording sources:
microphone, line, and auxiliary A (CD). Microphone
input is the default source after any reset.
The ES1879 has seven recording sources. Use mixer
register 1Ch to choose additional sources.
3. Program the input volume.
The selected source passes through an input volume
stage that can be programmed with 16 levels of gain
from 0 to +22.5 dB in steps of 1.5 dB. In 8-bit
recordings (other than High-Speed mode), the volume
stage is controlled by the ES1879 firmware for the
purposes of automatic gain control (AGC). In 16-bit
recordings as well as High-Speed mode 8-bit
recordings, the input volume stage is controllable from
application software. Use command DDh to change
the input volume level from 0 to 15. The reset default is
mid-range, 8.
4. Enable stereo mode (optional).
Set bit 1 of mixer register 0Eh high. Use only DMA
mode. Clear bit 1 of mixer register 0Eh after the ADC
transfer.
5. Set sample rate and filter clock.
Use commands 40h or 41h to set the sample rate and
filter clock divider. If you want to set the filter clock to be
independent from the sample rate, use command 42h
in addition to 40h or 41h.
For stereo transfers, set the timer divider to twice the
per-channel sample rate. The maximum stereo
transfer rate for 8-bit data is 22 kHz per channel; so for
this case, program the first timer divider as if you were
transferring data at 44 kHz mono. The maximum stereo
transfer rate for 16-bit data is 11 kHz per channel.
6. Set the block size. Only use this command (48h) with
High-Speed DMA transfer modes (commands 98h and
99h).
7. Configure the system interrupt controller and system
DMA controller.
8. Start DMA.
Start the DMA transfer by sending the command for the
desired transfer type and data length. The
uncompressed modes are shown in Table 17. See
Table 28 for a description of the commands in addition
to the commands for DMA transfers of compressed
data.
9. Delay approximately 100 msec to allow the analog
circuits to settle, then enable the Audio 1 DAC input to
mixer with command D1h.
10.During DMA.
For Auto-Initialize mode, it is not necessary to send any
commands to the ES1879 at interrupt time, except to
read Audio_Base+Eh to clear the interrupt request.
For Normal mode, initialize the system DMA controller
with the address and count of the next block size if it
changes. Use command 48h. To start the next transfer,
use command D4h.
To stop DMA after the current auto-initialize block is
finished, use command D0h.
Commands such as D0h, which suspends DMA, are
acceptable to send during DMA transfers. These
commands can only be sent during certain windows of
opportunity. See “Writing Commands to ES1879
Controller Registers” on page 52.
11.After DMA is finished, restore the system interrupt
controller and DMA controller to their idle state. Monitor
the FIFO Empty status flag in port Audio_Base+Ch to
be sure that data transfer is completed.
12.Issue another software reset to the ES1879 to initialize
the appropriate registers.
Table 17 Uncompressed ADC Transfer Modes
ADC DMA Transfer Mode Data Length Command
Direct 8-bit 20h
16-bit 21h
DMA mode Normal 8-bit 24h
16-bit 25h
High-Speed 8-bit 99h
DMA mode Auto-Initialize 8-bit 2Ch
16-bit 2Dh
High-Speed 8-bit 98h










