AD9985A
black output (code 0x00) when the known black input is
present. The offset then remains in place when other signal
levels are processed, and the entire signal is shifted to eliminate
offset errors.
Rev. 0 | Page 12 of 32
In most PC graphics systems, black is transmitted between
active video lines. With CRT displays, when the electron beam
has completed writing a horizontal line on the screen (at the
right side), the beam is deflected quickly to the left side of the
screen (called horizontal retrace), and a black signal is provided
to prevent the beam from disturbing the image.
In systems with embedded sync, a blacker-than-black signal
(Hsync) is produced briefly to signal the CRT that it is time to
begin a retrace. For obvious reasons, it is important to avoid
clamping on the tip of Hsync. Fortunately, there is virtually
always a period following Hsync, called the back porch, when a
good black reference is provided. This is the time when clamp-
ing should be performed.
The clamp timing can be established by simply exercising the
CLAMP pin at the appropriate time (with External Clamp = 1).
The polarity of this signal is set by the clamp polarity bit.
A simpler method of clamp timing uses the AD9985A internal
clamp timing generator. The clamp placement register is pro-
grammed with the number of pixel times that should pass after
the trailing edge of Hsync before clamping starts. A second
register (clamp duration) sets the duration of the clamp. These
are both 8-bit values, which provide considerable flexibility in
clamp generation. The clamp timing is referenced to the trailing
edge of Hsync because, though Hsync duration can vary widely,
the back porch (black reference) always follows Hsync. A good
starting point for establishing clamping is to set the clamp
placement to 0x09 (providing 9 pixel periods for the graphics
signal to stabilize after sync) and set the clamp duration to 0x14
(giving the clamp 20 pixel periods to re-establish the black
reference).
Clamping is accomplished by placing an appropriate charge on
the external input coupling capacitor. The value of this
capacitor affects the performance of the clamp. If it is too small,
there is a significant amplitude change during a horizontal line
time (between clamping intervals). If the capacitor is too large,
it takes excessively long for the clamp to recover from a large
change in incoming signal offset. The recommended value
(47 nF) results in recovering from a step error of 100 mV to
within 1/2 LSB in 10 lines with a clamp duration of 20 pixel
periods on a 60 Hz SXGA signal.
YUV Clamping
YUV graphics signals are slightly different from RGB signals, as
the dc reference level (black level in RGB signals) can be at the
midpoint of the graphics signal rather than at the bottom. For
these signals, it might be necessary to clamp to the midscale
range of the ADC range (0x80) rather than at the bottom of the
ADC converter range (0x00).
Clamping to midscale rather than to ground can be accom-
plished by setting the clamp select bits in the serial bus register.
Each of the three converters has its own selection bit so that
they can be clamped to either midscale or ground independ-
ently. These bits are located in Register 0x10, Bits [2:0]. The
midscale reference voltage that each ADC clamps to is provided
on the MIDSCV pin (Pin 37). This pin should be bypassed to
ground with a 0.1 μF capacitor, even if midscale clamping is not
required.
GAIN AND OFFSET CONTROL
The AD9985A can accommodate input signals with inputs
ranging from 0.5 V to 1.0 V full scale. The full-scale range is set
in three 8-bit registers (red gain, green gain, and blue gain).
Note that increasing the gain setting results in an image with
less contrast.
The offset control shifts the entire input range, resulting in a
change in image brightness. Three 7-bit registers (red offset,
green offset, blue offset) provide independent settings for each
channel. The offset controls provide a ±63 LSB adjustment
range. This range is connected with the full-scale range, so if the
input range is doubled (from 0.5 V to 1.0 V), the offset step size
is also doubled (from 2 mV per step to 4 mV per step).
Figure 4 shows the interaction of gain and offset controls. The
magnitude of an LSB in offset adjustment is proportional to the
full-scale range, so changing the full-scale range also changes
the offset. The change is minimal if the offset setting is near
midscale. When changing the offset, the full-scale range is not
affected, but the full-scale level is shifted by the same amount as
the zero-scale level.
GAIN
1.0
0
00H
FFH
I
0.5
OFFSET = 00H
OFFSET = 3FH
OFFSET = 7FH
OFFSET = 00H
OFFSET = 7FH
OFFSET = 3FH
0
Figure 4. Gain and Offset Control
Auto Offset
In addition to the manual offset adjustment mode (via registers
0x0B to 0x0D), the AD9985A also includes circuitry to auto-
matically calibrate the offset for each channel. By monitoring