Specifications
ESS Technology, Inc. SAM0025A-062397 53
ES1879 DATA SHEET
PROGRAMMING THE ES1879
PRELIMINARY
Extended Mode Audio 1 DAC Operation
Follow the steps below to program the first audio channel
for Extended mode DAC operation.
1. Reset:
Write 3h to port Audio_Base+6h, instead of 1h as in
Compatibility mode. Bit 1 high specifically clears the
FIFO. The remainder of the software reset is identical
to Compatibility mode. Reset disables the Audio 1 DAC
input to the mixer. This is intended to mask any pops
created during the setup of the DMA transfer.
2. After the reset, send command C6h to enable
Extended mode commands.
3. Program direction and type: registers B8h, A8h, and
B9h:
Register B8h: Set bit 2 low for Normal DMA mode, high
for Auto-Initialize DMA mode. Leave bit 3 low for the
CODEC to run in the DAC direction.
Register A8h: Read this register to preserve the bits
and then modify only bits 1 and 0:
Bits 1:0 10: Mono
01: Stereo
Set register B9h:
Bits 1:0 00: Single transfer DMA.
01: Demand transfer DMA:
2 bytes per DMA request.
10: Demand transfer DMA:
4 bytes per DMA request.
4. Clocks and counters: registers A1h, A2h, A4h and A5h:
Register A1h: Audio 1 Sample Rate Generator.
Register A2h: Audio 1 Filter Clock Divider.
Registers A4h/A5h: Audio 1 Transfer Count Reload
register, low/high byte, two's complement.
5. Initialize and configure DACs: registers B6h and B7h:
See Table 18.
Register B6h: Write 80h for signed data and 00h for
unsigned data. This also initializes the CODEC for
DAC transfer.
Register B7h: Programs the FIFO (16-bit/8-bit, signed/
unsigned, stereo/mono). The first command sent to
register B7h prevents pops.
6. Set DMA control registers B1h and B2h:
Register B1h: Interrupt Configuration register.
Make sure bit 6 is high. Clear bits 7 and 5.
Register B2h: DRQ Configuration register.
Make sure bit 6 is high. Clear bits 7 and 5.
7. Configure system interrupt controller and DMA
controller.
8. To start DMA:
Set bit 0 of register B8h high while preserving all other
bits.
9. Delay approximately 100 milliseconds to allow analog
circuits to settle, then enable the Audio 1 DAC input to
mixer with command D1h.
10.During DMA:
For Auto-Initialize mode DMA transfers, read
Audio_Base+Eh to clear the interrupt request. Do not
send any other commands to the ES1879 at interrupt
time.
Table 18 Command Sequences for DMA Playback
Mono
Stereo
8-bits
16-bits
Unsigned
Signed
Sequence
X X X Reg B6h = 80h
Reg B7h = 51h
Reg B7h = D0h
X X X Reg B6h = 00h
Reg B7h = 71h
Reg B7h = F0h
X X X Reg B6h = 80h
Reg B7h = 51h
Reg B7h = D4h
X X X Reg B6h = 00h
Reg B7h = 71h
Reg B7h = F4h
X X X Reg B6h = 80h
Reg B7h = 51h
Reg B7h = 98h
X X X Reg B6h = 00h
Reg B7h = 71h
Reg B7h = B8h
X X X Reg B6h = 80h
Reg B7h = 51h
Reg B7h = 9Ch
X X X Reg B6h = 00h
Reg B7h = 71h
Reg B7h = BCh










