
An 8-bit successive-approximation ADC and an 8-bit DAC. The ADC's input, on ua[1], is measured
against the 1.8 V supply: code 0 is ground and code 255 the supply less one step of 7 mV and output on uo[7:0].
The DAC's output, on ua[0], is the code times the same step; its code is the ADC output (DAC_SRC=0),
a word on the input pins ui[7:0] (DAC_SRC=1), or, with SPDIF_EN high, the top eight bits of the first
channel of an S/PDIF stream on uio[5].
Simulated on its extracted layout, the ADC converts about 909 thousand samples a second with START held.
A sine just under full scale comes out with an SNDR of 49.6 dB at 90 kHz and 49.5 dB at 452 kHz
(ENOB 7.9; an exact 8-bit ADC gives 49.6). The SFDR is 65 dBc. The simulation has no mismatch and no
noise, so on silicon the supply's noise and mismatch will take some of that.
The ADC's analog part is a binary-weighted array of 256 metal-insulator-metal capacitors of 9.3 fF, switches on their bottom plates, and a comparator: a differential stage with a current source, then two inverters. While it tracks, that stage is a follower that holds the capacitors' top plate at a reference voltage, and the bottom plates follow the input. A conversion lets the top plate and the reference go (the reference is kept on a capacitor), moves the bottom plates to the supply or to ground a bit at a time, the largest capacitor first, and reads from the comparator whether the top plate has come out above the reference or below it. A second capacitor as large as the array, from the top plate to ground, halves the top plate's swing so that it stays between ground and the supply for any input.
The DAC is 60 kohm resistors of precision polysilicon, each leg's foot switched to the supply or to ground by two transistors: seven equal legs for the top three bits, which turn on one after another, and an R-2R ladder for the low five. Its output is 7.5 kohm at every code, with no buffer.
The control logic is implemented in Verilog. The S/PDIF receiver samples the biphase-mark coded line on both edges of the 50 MHz clock, counts the length of each pulse in half clocks, and tells 1, 2 and 3 half-slot pulses apart by the longest it has seen lately (a preamble's), high pulses and low each by their own. So it needs no setting for 32, 44.1, 48, 88.2 or 96 kHz, and takes a line whose edges are up to 8 ns from their places at 96 kHz, with its high pulses up to 30 ns longer or shorter than its low ones, as optical receivers give.
Clock the project at 50 MHz (the ADC steps on every fifth clock, so a slower clock slows it in
proportion, and the S/PDIF receiver wants 50 MHz) and take rst_n low and high again. Put a voltage between
ground and 1.8 V on ua[1], from a source of 500 ohm or less, or with 1 nF or more from ua[1] to
ground: each conversion starts by drawing its 2.5 pF of capacitors to the input, and a source of 10 kohm
leaves some 3 codes of the last conversion in the next. The supply is the reference: a code is the
input's share of VDPWR, so a supply 1% low reads 1% high. Measure the supply too, or read the DAC
back through the ADC.
Raise START (uio[3]). BUSY (uio[1]) answers; about a microsecond (48 to 52 clocks) after
START rose, VALID (uio[0]) is high for 100 ns and the code is on uo[7:0], where it stays until the
next conversion ends. Let START go once BUSY is high for one conversion; hold it for one every
1.1 microseconds (55 clocks). CMP (uio[2]) is the comparator's decision as the logic last took it.
With DAC_SRC (uio[4]) low the DAC follows the ADC: ua[0] goes to each new code's voltage as
VALID rises. With DAC_SRC high the DAC takes the word on ui[7:0]. A word is taken when it has
been the same for two clocks, so it need not come in step with the clock, as long as its bits change
within 20 ns of each other.
With SPDIF_EN (uio[6]) high the DAC plays S/PDIF: feed a coaxial or optical receiver's logic
output (0 to 1.8 V) to uio[5]. LOCK (uio[7]) rises after eight good subframes in a row and
falls at a fault or when the line stops; while it is low the DAC holds its last sample. The DAC takes
the first (left) channel's top eight bits, offset binary: silence is mid-scale, 0.9 V. uio[2:0] and
uio[7] are always outputs and uio[6:3] always inputs.
Measure ua[0] with something that draws little, a meter or a scope's probe: the output is 7.5 kohm,
and 8 kohm with the pad's path, with no buffer, so a load R takes 8 kohm / (8 kohm + R) off every code:
1 Mohm 0.8%, 100 kohm 7%, 10 kohm 44%. Like the ADC, its full scale is the supply. A full-scale step settles in a little over a microsecond behind 15 pF. With ua[0] joined
to ua[1] and DAC_SRC high, the ADC reads back the word on the pins or one less.
In simulation the tile's layout played a sine of new words every 2.56 µs at 49.3 dB SNDR and 63 dBc SFDR (ENOB 7.9) on its settled levels. The steps glitch by a third of a code for about 100 ns at the carries. Without a filter after the pin, the steps take sin x / x off the signal: 3.9 dB at half the word rate.
A voltage to measure: a potentiometer between 1.8 V and ground will do. For S/PDIF, an optical receiver (a TOSLINK module) or a coaxial input with a comparator, its output at 1.8 V logic levels. For the DAC, a buffer (an op-amp follower) if the load is under some 1 Mohm.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | DAC0 | ADC0 | VALID |
| 1 | DAC1 | ADC1 | BUSY |
| 2 | DAC2 | ADC2 | CMP |
| 3 | DAC3 | ADC3 | START |
| 4 | DAC4 | ADC4 | DAC_SRC |
| 5 | DAC5 | ADC5 | SPDIF_IN |
| 6 | DAC6 | ADC6 | SPDIF_EN |
| 7 | DAC7 | ADC7 | LOCK |
ua | PCB Pin | Internal index | Description |
|---|---|---|---|
| 0 | R | 10 | DAC_OUT |
| 1 | Q | 11 | ADC_IN |