Specifications
52 SAM0025A-062397 ESS Technology, Inc.
ES1879 DATA SHEET
PROGRAMMING THE ES1879
PRELIMINARY
The maximum sample rate for Direct mode ADC is 22 kHz.
The maximum sample rate for DMA ADC for both 8-bit and
16-bit is 22 kHz, using commands 24h, 25h, 2Ch, or 2Dh.
There is a special High-Speed mode for ADC that allows
8-bit sampling up to 44 kHz. This mode uses commands
98h (auto-initialize) and 99h (normal). No AGC is
performed as the input volume is controlled with command
DDh.
Extended Mode Pro
g
rammin
g
This section describes Extended mode programming.
Commanding ES1879 Controller Registers
Controller registers are written to and read from using
commands sent to ports Audio_Base+Ch and
Audio_Base+Ah.
Commands of the format Axh, Bxh, and Cxh, where x is a
numeric value, are used for Extended mode programming
of the first audio channel.
Commands of the format Ax and Bx are used to access
the ES1879 controller registers. For convenience, the
registers are named after the commands used to access
them. For example “register A4h,” the Audio 1 Transfer
Count Reload (low-byte) register, is written to by
“command A4h.”
Enabling Extended Mode Commands
After any reset and before using any Extended mode
commands, first send command C6h to enable Extended
mode commands.
ES1879 Command/Data Handshaking Protocol
This section describes how to write commands to and read
data from the ES1879 controller registers.
Writing Commands to ES1879 Controller Registers
Commands written to the ES1879 enter a write buffer.
Before writing the command, make sure the buffer is not
busy.
Bit 7 of port Audio_Base+Ch is the ES1879 Busy flag. It is
set when the write buffer is full or when the ES1879 is
otherwise busy (for example, during initialization after
reset or during Compatibility mode DMA requests).
To write a command or data byte to the ES1879
microcontroller:
1. Poll bit 7 of port Audio_Base+Ch until it is clear.
2. Write the command/data byte to port Audio_Base+Ch.
The following is an example of writing to ES1879 controller
registers. To set up the Audio 1 Transfer Count Reload
register to F800h, send the following command/data
bytes:
A4h, 00h; register A4h = 00h
A5h, F8h; register A5h = F8h
NOTE:
The port Audio_Base+Ch write buffer is shared
with Compatibility mode DMA write operations. When
DMA is active, the Busy flag is cleared during windows of
time when a command can be received. Normally, the only
commands that should be sent during DMA operations are
Dxh commands such as DMA pause/continue and Audio
1 DAC enable/disable. In this situation, it is recommended
to disable interrupts between the time that the Busy bit is
polled and the command is written. Also, minimize the time
between these instructions. See “Sending Commands
During DMA Operations” on page 49 for more information.
Reading the Read Data Buffer of the ES1879
Command C0h is used to read the ES1879 controller
registers used for Extended mode. Send command C0h
followed by the register number, Axh or Bxh. For example,
to read register A4h, send the following command bytes:
C0h, A4h
Then poll the Read-Data-Buffer-Status bit, bit 7 of port
Audio_Base+Eh, before reading the register contents of
port Audio_Base+Ah.
The Read-Data-Buffer-Status flag can be polled by
reading bit 7 of port Audio_Base+Eh. When a byte is
available, the bit is set high.
NOTE:
Any read of port Audio_Base+Eh also clears any
active interrupt request from the ES1879. An alternate
way of polling the Read-Data-Buffer-Status bit is through
bit 6 of port Audio_Base+Ch, which is the same flag. The
Read-Data-Buffer-Status flag is cleared automatically by
reading the byte from port Audio_Base+Ah.










