VIIIPACKAGE MECHANICAL DATA .........................................42
2/42
Page 3
I - GENERALDESCRIPTION
The STV0118 is a high performance PAL/NTSC
digital encoderin a low cost pakage. It converts a
4:2:2 digital video stream into a standard analog
basebandPAL/NTSCsignal and into RGB analog
components.The STV0118can handle interlaced
mode(with 525/625 line standards)and non-interlaced mode. It can perform Closed-Captions,
CGMSor Teletextencoding.
II - PIN INFORMATION
II.1 - Pin Connections
STV0118
Four analog output pins are available, on which it
is possible to output either S-VHS(Y/C) + CVBS1
+ CVBS2or RGB + CVBS. Moreover,it is possible
to use two STV0118 in parallel to interface with
SGS-THOMSON’s MPEG decoder ICs that are
able to deliver a 54Mbit/s “double” YCrCb stream
(e.g. the STi3520M). This allows for example to
encode OSD in one of the streamsonly.
This output must be connected to analogground over a load resistor(R
Following the load resistor, a simple analog low pass filter is recommended.
V
OUT(Max.)
with N = [0-511].
=1VPPand I
OUT(Max.)
= 5mA (V
OUT(N)
=NxR
LOADxIREF(RGB)
This output must be connected to analogground over a load resistor(R
Following the load resistor, a simple analog low pass filter is recommended.
V
OUT(Max.)
with N = [0-511].
=1VPPand I
OUT(Max.)
= 5mA (V
OUT(N)
=NxR
LOADxIREF(RGB)
This output must be connected to analogground over a load resistor(R
Following the load resistor, a simple analog low pass filter is recommended.
V
OUT(Max.)
with N = [0-511].
=1VPPand I
OUT(Max.)
= 5mA (V
OUT(N)
=NxR
LOADxIREF(RGB)
LOAD
/96)
LOAD
/96)
LOAD
/96)
Transport IC.
edge of CKREF signal average rate of6.9375Mbit/s.
Output in test mode only.
/96) with N = [0-
= 5mA
REF(RGB)
= 5mA
).
).
).
4/42
Page 5
II - PIN INFORMATION (continued)
II.2 - Pin Description(continued)
PinNameTypeFunction
24CKREFIMaster clock reference signal.
25RESETIHardware reset, active LOW.
26SCLII
27SDAI/OI
28VSYNC/
ODDEVEN
Its rising edge is the default reference for set-up and hold times of all inputs, and for
propagation delay of alloutputs (exceptfor SDA output).
CKREF nominal frequency is 27MHz (CCIR601) : input pad with pull down (50kΩ Typ.)
Ithas priorityoversoftware reset.NRESET imposesdefaultstates (seeRegisterContents).
Minimum Low level required duration is 5 CKREF periods : input pad with pull down
(50kΩ Typ.)
2
C bus clock line (internal 5-bit majority logic with CKREF forreference) : input pad with
pull down (50kΩTyp.)
2
C bus serial data line.
Input : internal 5-bit majority logic with CKREF for reference
Output : open drain
I/OFrame sync signal :
- input in slave modes, except when sync isextracted from YCrCb data
- output in mastermode and when sync is extracted from YCrCb data
- synchronous to rising edge of CKREF
- ODDEVEN default polarity :
odd (not-top) field : LOW level
even (bottom) field : HIGH level
STV0118
III - BLOCK DIAGRAM
V
21
DD
YCRCB7
YCRCB6
YCRCB5
YCRCB4
YCRCB3
YCRCB2
YCRCB1
YCRCB0
VSYNC/ODDEVEN
HSYNC
RESET
2
3
4
5
6
7
8
9
10V
SS
28
1
25
24CKREF
TTXS/
TTXD
CSI2C
2223
TELETEXT
CB-CR
Y
DEMULTIPLEXER
SYNC CONTROL
& VIDEO TIMING
GENERATOR
CSI2C
TTXS
RGB ENCODING
PROCESSING
CHROMA
PROCESSOR
CSI2C
LUMA
CLOSED
CAPTIONS
CGMS
CTRL + CFG
REGISTER
SDASCL
2
C BUS
I
AUTOTEST
COLOR BAR
PATTERN
TRAP
2627
SWITCH
STV0118
V
DDA
9-BIT TRIDAC
V
DDA
9-BIT
DAC
G/Y
20
R/C
19
B/CVBS
18
VR_RGB
17
I
16
REF(RGB)
V
SSA
V
14
SSA
15
V
DDA
CVBS
11
VR_CVBS
12
I
13
REF(CVBS)
V
SSA
0118-02.EPS
5/42
Page 6
STV0118
IV- FUNCTIONALDESCRIPTION
The STV0118can operate either in mastermode,
where it supplies all sync signals, or in 6 slave
modes,where it locksonto incomingsync signals.
The main functions are controlledby a micro-controller via an I
Register Description” for an exhaustivelist of the
controlpossibilities available.
IV.1 - Data Input Format
The digital input is a time-multiplexed ITU-R656
/D1-type [Cb, Y, Cr, Y] 8-bit stream. Note that
“ITU-R”was formerly knownas “CCIR”.Inputsamples are latched in on the rising edge (by default)
of the clock signal CKREF, whose nominal frequencyis 27MHz.Figure1 illustratesthe expected
datainput format. Alternatively,a 54-Mbit/sstream
can be fed to the STV0118,refer to SectionIV.17
(“dualencoding”)for details.
The STV0118 is able to encode interlaced and
non-interlacedvideo. One bit is sufficient to automaticallydirect the STV0118to process non-interlaced video. Update is performed internallyon the
firstframesync activeedgefollowingthe programing of this bit. The non-interlaced mode is a
624/2= 312 linemode or a 524/2= 262line mode,
whereall fieldsare identical.
An ‘autotest’ mode is available by setting 3 bits
(sync[2:0]) within the configurations register0.
Inthis mode,a color bar patternis produced,independentlyfrom video input, in the adequatestandard. As this mode sets the STV0118 in master
mode, VSYNC/ODDEVand HSYNC pins are then
in output mode.
IV.2 - Video Timing
TheSTV0118outputsinterlaced or non-interlaced
video in PAL-B, D, G, H, I, PAL-N, PAL-M or
NTSC-M standardsand ‘NTSC- 4.43’ is also possible.
The4-frame (for PAL)or 2 frame (for NTSC)burst
sequences are internally generated, subcarrier
generation being performed numerically with
CKREF as reference. Rise and fall times of synchronizationtipsandburst enveloppeareinternally
controlled according to the relevant ITU-R and
SMPTErecommendations.
Figures2 to 7 depict typicalVBI waveforms.
It is possibleto allow encodingof incomingYCrCb
dataon thoselines of the VBIthatdo not bearline
sync pulses or pre/post-equalisation pulses (see
Figures2 to 7). This mode of operation is refered
to as “partial blanking” and is the default set-up. It
2
C 2-wire bus. Refer to the “User’s
allows to keep in the encoded waveform any VBI
data present in digitized form in the incoming
YCrCb stream (e.g. WSS data, VPS, supplementary Closed-Captions line or StarSightdata, etc.).
Alternatively,thecompleteVBImaybe blanked(no
incomingYCrCb data encodedonthese lines,“full
blanking”).
ThecompleteVBIcomprisesof the followinglines:
- for 525/60systems (SMPTEline numberingconvention): lines1to 19andsecondhalf ofline263
to line 282.
- for 625/50 systems (CCIR line numbering convention) : second half of line 623 to line 22 and
lines 311to 335.
The ‘partial’VBI consists of :
- for 525/60systems (SMPTEline numberingconvention): lines 1 to 9 and secondhalf of line263
to line 272.
- for 625/50 systems (CCIR line numbering convention): secondhalf ofline623toline 5andlines
311to 318.
Fullorpartialblankingiscontrolledby configuration
bit ‘blkli in configurationregister1’.
Note that :
- line 282 in 525/60/SMPTEsystems is either fully
blankedor fullyactive.
- line 23 in 625/60/CCIR systems is always fully
active.
InanITU-R656-compliantdigitalTVline, theactive
portion of the digital line is the portion included
between the SAV (Start of Active Video) and EAV
(End of Active Video) words. However,this digital
active line starts somewhat earlier and may end
slightlylater than the active line usually definedby
analog standards. The STV0118 allows two approaches:
- It is possible to encode the full digital line (720
pixels/ 1440clockcycles).Inthiscase,theoutput
waveform will reflect the full YCrCb stream included betweenSAV and EAV.
- Alternatively,it is possible to drop some YCrCb
samples at the extremities of the digital line so
that the encoded analog line fits within the ‘analog’ ITU-R/SMPTEspecifications.
Selection between these two modes of operation
is performed with bit ‘aline’ in configuration register 4.
In all cases, the transitions between horizontal
blankingand activevideo are shaped to avoid too
steepedgeswithin theactive video. Figure8 gives
timingsconcerning the horizontalblankinginterval
and the active videointerval.
6/42
Page 7
IV- FUNCTIONALDESCRIPTION(continued)
Figure1 : Input Data Format
IV- FUNCTIONALDESCRIPTION(continued)
Figure6 : PAL-MTypical VBI Waveforms,Interlaced Mode(CCIR-525 Line Numbering)
F’
0
PartialVBI1
V
I
FullVBI1
STV0118
AB
519F520F’521F522523524525123456789
F
257F’258F259260
F
519F’520F521522
F’
257F258259260
C
0V:
Framesynchronizationreference
I, II, III, IV :
1stand5th,2ndand6th,3rdand7th,4thand8thfields
A:
Burstphase: nominalvalue +135°
B:
Burstphase: nominalvalue -135°
C:
Burstsuppressioninternal
261262263264265266267268269270271280
523524525123456789
261262263264265266267268269270271272
PartialVBI2
II
III
IV
I
II
III
IV
FullVBI2
AB
AB
Figure7 : PAL-MTypical VBI Waveforms,Non-interlacedMode (“CCIR-like” Line Numbering)
0
V
Partial VBI
Full VBI
AB
16 17
AB
279
0118-13.EPS
256257258259260261262123456789
Burstphase toggles every line
10 16 17
0118-14.EPS
9/42
Page 10
STV0118
IV- FUNCTIONALDESCRIPTION(continued)
Figure8 : HorizontalBlanking Intervaland Active Video Timings
d
0
H
b
a
(bit”aline” = 0)
c1
c2 (bit ”aline” = 1)
Full Digital Line Encoding
(720Pixels - 1440T)
”Analog” Line Encoding
(710Pixels - 1420T)
NTSC-M
5.38µs(even lines)
a
5.52µs(odd lines)
Actual values will depend on the static offset programmed for subcarrier generation.
b
c1
c2
d
1.56µs
8.8µs
9.3µs
9 Cyclesof 3.58MHz
PAL-BDGHI
5.54µs(A-type)
5.66µs(B-type)
Theseare typical values.
1.28µs
9.3µs
10.1µs
10 Cyclesof 4.43MHz
IV.3 - Reset Procedure
Ahardwarereset is performedbygroundingthepin
NRESET. The master clock must be running and
pin NRESET kept low for a minimum of 5 clock
cycles.This setsthe STV0118in HSYNC+ODDEV
(line-locked) slave mode, for NTSC-M, interlaced
ITU-R601 encodin g. Closed-captioning and
Teletextencodingare all disabled.
Then the configuration can be customized by writing into the appropriateregisters. A few registers
PAL-N
5.54µs(A-type)
5.66µs(B-type)
1.28µs
9.3µs
10.1µs
9 Cyclesof 3.58MHz
PAL-M
5.73µs(A-type)
5.87µs(B-type)
1.28µs
9.3µs
10.1µs
9 Cyclesof 3.58MHz
are neverreset, their contentsis unknownuntilthe
first loading (refer to the Register Contents and
Description).
It is also possible to perform a software reset by
settingbit’softreset’in Reg6. The IC’s response in
that caseis similarto itsresponseafter a hardware
reset, except that Configuration Registers
(Reg0 to6) anda fewotherregisters(seedescription of bit‘softreset’)are not altered .
In this mode, the STV0118 supplies HSYNC and
ODDEVsyncsignals(withindependentlyprogrammable polarities) to drive other blocks. Refer to
Figure9 and 10 for timings and waveforms.
The STV0118 starts encoding and counting clock
Figure9 : ODDEVEN,VSYNC and HSYNC Waveforms
Active edge (programmable polarity)
ODDEVEN
(see Note 1)
Active edge (programmable polarity)
VSYNC
Active edge (programmable polarity)
HSYNC
(see Note 2)
Line Numbers :
SMPTE-525
CCIR-62541
Notes : 1. When ODDEVEN is a sync input, only one edge (“the active edge”) of the incoming ODDEVEN is taken into account for
synchronization. The “non-active” edge (2nd edge on this drawing) is not critical and its positionmaydiffer by H/2 from the location
shown.
2. The HSYNC pulse width indicated is valid when the STV0118 supplies HSYNC.In those slave modes where it receives HSYNC,
only the edge defined as active is relevant, and the width of the HSYNC pulse it receives is not critical.
128 T
5
2
6
3
ckref
= 4.74µs
cycles as soon as the master mode has been
loadedinto the control register (Reg.0).
Configurationbits“Syncout_ad[1:0]”(Reg4)allowto
shift the relative position of the syncsignals by up
to 3 clockcyclesto cope with any YCrCb phasing.
266
313
267
314
268
315
269
316
0118-16.EPS
Figure10 : MasterMode Sync Signals
CKREF
ODDEVEN
(out)
HSYNC
(out)
YCRCB
Note : 1. This figureis valid for bits “syncout_ad[1:0]” = default.
Six slave modes are available : ODDEV+HSYNC
based (line-based sync), VSYNC+HSYNC based
(another type of line-based sync), ODDEV-only
based (frame-based sync), VSYNC-only based
(another type of frame-based sync), or sync-indatabased (line locked or frame locked).
ODDEV refers to an odd/even (also known as
not-top/bottom) field flag, HSYNC is a line sync
signal,VSYNCis averticalsync signal.Theirwaveforms are depicted in Figure 9. The polarities of
HSYNC and VSYNC/ODDEV are independently
programmablein all slave modes.
IV.5.1- Synchronizationontoa Line SyncSignal
IV.5.1.1- HSYNC+ODDEV BasedSynchronization
Synchronizationis performedon a line-by-linebasis by locking onto incoming ODDEV and HSYNC
signals. Refer to Figure 11 for waveforms and
timings. The polarities of the active edges of
HSYNCand ODDEVare programmableandindependent.
Thefirstactiveedge of ODDEVinitializesthe internal line counter but encoding of the first line does
not start until an HSYNC active edge is detected
(atthe earliest,HSYNC maytransitionat thesame
timeas ODDEV).At thatpoint, the internalsample
counter is initialized and encoding of the first line
starts. Then, encoding of each subsequent line is
individuallytriggeredby HSYNCactive edges.The
phase relationship between HSYNC and the incoming YCrCB data is normally such that the first
clockrising edgefollowingthe HSYNCactiveedge
samples “Cb” (i.e. a ‘blue’ chroma sample within
theYCrCb stream). It is however possible to internally delay the incoming sync signals
(HSYNC+ODDEV) by up to 3 clock cycles to cope
withdifferentdata/syncphasings,using configurationbits “Syncin_ad” (Reg. 4).
The STV0118 is thus fully slaved to the HSYNC
signal, which means that lines may contain more
or less samples than typical 525/625 system requirement.
If the digital line is shorter than its nominal value:
the samplecounteris re-initializedwhen the ‘early’
HSYNC arrives and all internal synchronization
signals are re-initialized.
If the digital line is longer than its nominal value :
the sample counter is stoppedwhen it reachesits
nominal end-of-line value and waits for the ‘late’
HSYNCbefore reinitializing.
The field counteris incrementedon each ODDEV
transition.The linecounteris reseton theHSYNC
followingeach active edge of ODDEV.
IV.5.1. 2- HSYNC + VSYNC BasedSynchron ization
Synchronizationis performed on a line-by-line basis by locking onto incoming VSYNC and HSYNC
signals. Refer to Figure 12 for waveforms and
timings. The polaritiesof HSYNC and VSYNC are
programmableand independent.
The incomingVSYNC signal is immediately transformed into a waveformidentical to the odd/even
waveform of an ODDEVsignal, therefore the behavior of the core is identical to that described
above for ODDEV+HSYNC based synchronization. Again, the p hase relationship between
HSYNC and the incoming YCrCb data is normally
such that the first clock rising edge following the
HSYNC active edge samples “Cb” (i.e. a ‘blue’
chroma sample within the YCrCb stream). It is
however possible to internally delay the incoming
sync signals (HSYNC+VSYNC) by up to 3 clock
cycles to cope with different data/sync phasings,
using configurationbits “Syncin_ad”(Reg. 4).
The field counter is incremented on each active
edge of VSYNC.
CKREF
ActiveEdge (programmablepolarity)
ODDEVEN
(in)
HSYNC
(in)
YCRCB
Note : 1. This figure is valid for bits “syncin_ad[1:0]” = default.
Notes : 1. This figure is valid for bits “syncin_ad[1:0]” = default.
2. The active edges of HSYNC and VSYNC should normally be simultaneous. Itis permissible that HSYNC transitions before
VSYNC, but VSYNC must not transition before HSYNC.
Figure13 : ODDEVENBasedSlave Mode Sync Signals
CKREF
Active Edge (programmable polarity)
ODDEVEN
(in)
YCRCB
Note : 1. Thisfigure is valid for bits “syncin_ad[1:0]” = default.
IV .5 .2-Synchro niz a tio nontoa FrameSyncSignal
IV.5.2.1 - ODDEV-only Based Synchronization
Synchronizationis performedon a frame-by-frame
basis by locking onto an incoming ODDEV signal.
A line sync signal is derived internally and is also
output as HSYNC. Refer to Figure 13 for waveformsandtimings.Thephaserelationshipbetween
ODDEVand the incomingYCrCB data is normally
such that the first clock rising edge following the
ODDEV active edge samples “Cb” (i.e. a ‘blue’
chroma sample within the YCrCb stream). It is
however possible to internally delay the incoming
ODDEVsignalby up to3 clock cyclesto copewith
different data/sync phasings, using configuration
bits“Syncin_ad” (Reg. 4).
Thefirst active edgeofODDEVtriggersgeneration
of the analog sync signals and encoding of the
incomingvideo data.Framesbeingsupposedtobe
of constantduration, the next ODDEVactive transition is expected at a precise time after the last
ODDEVdetected.
So, once an active ODDEV edge has been detected, checks that the following ODDEV are present at the expected instants are performed.
In that case,threebehaviorsare possible,according to the configurationprogrammed (Reg. 1-2) :
- if ‘free-run’ is enabled, the STV0118 carries on
outputtingthe digitalline sync HSYNCand generating analog video just as though the expected
ODDEV edge had been present. However, it will
re-synchronizeontothe nextODDEVactiveedge
detected,whateverits location.
- if ‘free-run’ is disabled but bit ‘sync_ok’ is set in
configuration register1, the STV0118 sets the
active portion of the TV line to black level but
carrieson outputtingthe analogsync tips (on Ys
and CVBS) and the digital line sync signal
HSYNC.
- if ‘free-run’is disabledand the bit ‘sync_ok’is not
set, allanalog videois at blacklevel andneither
analog sync tips nor digital linesync are output.
Note that this mode is a frame-based sync mode,
asopposedtoa field-basedsyncmode,thatis,only
one type of edge (rising or falling, according to bit
‘polv’in Reg 0) is of interest to the STV0118,the
other one is ignored.
0118-19.EPS
0118-20.EPS
13/42
Page 14
STV0118
IV- FUNCTIONALDESCRIPTION(continued)
IV.5.2.2 - VSYNC only Based Synchronization
Synchronizationis performedon a frame-by-frame
basis by locking onto an incoming VSYNC signal.
An auxiliaryline sync signal HSYNC must also be
fedtotheSTV0118,whichusesittoreconstructfrom
VSYNC and HSYNC information an internal
odd/even waveform identical to that of an ODDEVENsignal.Thereforethe behaviorof the core is
identicaltothatdescribedaboveforODDEVENonly
basedsynchronization(exceptthatnothingisoutput
onHSYNCpinsinceit isan inputportin thatmode).
Notethat HSYNC is an input buthas no otheruse
than allowing the STV0118 to decide whether an
incoming VSYNC pulse flags an odd or an even
field. In other words, the STV0118 does not lock
onto HSYNC in this mode since this is NOT a
line-lockedmode.
The phase relationship between VSYNC and the
incomingYCrCb data is normallysuch thatthe first
clockrising edgefollowing the VSYNCactiveedge
samples “Cb” (i.e. a ‘blue’ chroma sample within
theYCrCb stream). It is however possible to internally delay the incoming sync signals
(VSYNC+HSYNC) by up to 3 clock cycles to cope
withdifferentdata/syncphasings,using configurationbits “Syncin_ad” (Reg. 4).
IV.5.3 - Synchronizationonto Data-embedded
SyncWords
IV.5.3.1 - ‘End-of-frame’ Word Based
Synchronization
Synchronizationis performed by extracting the 1to-0 transitions of the ‘F’ flag (end-of-frame) from
the ‘EAV’(End-of-ActiveVideo) sequenceembedded within ITU-R656 / D1 compliant digital video
streams.Both a frame sync signal and aline sync
signal are derived and are made available externally as ODDEVEN and HSYNC(see Figure14).
Thefirstsuccessfuldetectionof the‘F’flagtriggers
generationof theanalogsyncsignalsandencoding
of the incoming video data. Frames being supposed to be of constant duration, the next EAV
wordcontainingthe ‘F’flag isexpectedat a precise
Figure14 : Data (EAV)Based Slave Mode Sync Signals
time after the latestdetection.
So, once an active ‘F’ flag has been detected,
checks that the following flags are present within
the incoming video stream at the expected times
are performed.
Encodingand analogsync generationcarryon unlessthreesuccessivefailsof thesechecksoccur.
In that case, three behaviors are possible, according to the configurationprogrammed :
- if ‘free-run’ is enabled, the STV0118 carries on
- if ‘free-run’is disabledbut thebit ‘sync_ok’is setin
- if ‘free- run’isdisabledandthebit‘sync _ok ’isnotset,
The SAV and EAVwords are Hamming-decoded.
Afterdetectionof two successiveerrors,a bit is set
in the statusregister to inform the micro-controller
of thepoor transmissionquality.
IV.5.3.2- ‘End-of-line’Word Based
Synchronizationis performed by extracting the ‘F’
and ‘H’ flags from the ‘SAV’ (Start of Active Video)
and ‘EAV’ (End of Active Video) words embedded
withinITU-R656/D1compliantdigitalvideostreams.
Alinesyncsignalandaframesyncsignalarederived
internally from these flags and are output on the
HSYNC and ODDEVEN/VSYNC pins in output
mode.These signalsare also exploitedby the core
ofthecircuitwhichtreatsthem likeit treatsincoming
ODDEVENandHSYNCsignalsinHSYNC+ODDEV
basedsynchronization(seeSectionIV.5.1.1).
generatingthedigital frameandlinesyncs(ODDEVENand HSYNC)and generatinganalog video
just as though the expected ‘F’ flag had been
present. However, it will re-synchronize onto the
ne xt ‘F ’ flag dete cte d with in the inc omin g
CCIR656/D1 video stream.
the config urati on registers, the STV0118 sets the
activeportionof theTVline toblacklevel butcarries
onoutputtingtheanalogsynctips(onYsandCVBS)
andthedigitalframeandlinesyncsignalsODDEVEN
andHSYNC.
all analogvideo is at blackleveland neitheranalog
synctipsnordigitalframe/linesyncareoutput.
The incoming 27Mbit/s YCrCb data is demultiplexed into a ‘blue-difference’chroma information
stream, a ‘red-difference’ chroma information
stream and a luma information stream. Incoming
databits are treatedas blue, red or lumasamples
according to their relative position with respect to
the sync signals in use and to the content of configurationbits “Syncin_ad” (slave modes) or “Syncout_ad”(mastermode).
The ITU-R601 recommendationdefines the black
luma level as Y = 16dec and the maximum white
luma level as Y = 235dec. Similarly it defines225
quantizationlevels for the color differencecomponents(Cr, Cb), centeredaround 128.
Accordingly, incoming YCrCB samples can be
saturatedin the inputmultiplexerwith thefollowing
rules :
- for Cr or Cbsamples :
Cr,Cb > 240 ⇒ Cr,Cb saturatedat 240
Cr,Cb< 16⇒Cr,Cb saturated at 16
- for Y samples :
Y > 235 ⇒ Y saturated at 235
Y<16⇒Ysaturated at 16
This avoids having to heavily saturate the composite video codes before digital-to-analog conversion in case erroneous or unrealistic YCrCb
samples are input to the encoder (there may
otherwise be overflow errors in the codes driving
the DACs), and therefore avoids genera-ting a
distorded outputwaveform.
However,in someapplications,it maybe desirable
to let ‘extreme’ YCrCb codes pass through the
demultiplexer. This is also possible, provided that
bit “maxdyn”is set in configuationregister 6.
In this case, only codes 00hex and FFhex are
overridden: if such codes are found in the active
video samples, they are forced to 01hex and FEhex.
In any case, the YCrCb codes are not overridden
for EAV/SAVdecoding
A Direct Digital Frequency Synthesizer (DDFS)
using a 24-bit phase accumulator, generates the
requiredcolorsub-carrierfrequency.This oscillator
feedsaquadraturemodulatorwhich modulatesthe
basebandchrominancecomponents.
The sub-carrier frequency is obtained from the
followingequation :
Fsc = (24-bit IncrementWord / 2
Hard-wired Increment Word values are available
foreachstandard(exceptfor ‘NTSC-4.43’)andcan
be automaticallyselected.Alternatively(according
to bit ‘selrst’ in Reg. 2.), thefrequencycan be fully
customized by programming other values into a
dedicated Increment Word Register (Reg. 10-11-
12). This allows for instance to encode “NTSC-
4.43” or ”PAL-M-4.43”.
This is done with thefollowingprocedure :
- Program the required increment in Registers 10
to12
- Set bit ‘selrst’ to ‘1’ in ConfigurationRegister 2
- Perform a software reset(Reg. 6).
Caution : this sets back all bits from Reg. 7
onwardsto theirdefault value, when they can be
reset.
Warning :
if a standard change occurs after the
softwarereset,theincrementvalueisautomatically
re-initialized with the hardwired or loaded value
accordingto bit selrst.
The reset phase of the color sub-carrier can also
be software-controlled(Reg. 13-14).
The sub-carrier phasecan be periodicallyresetto
its nominal value to compensatefor any drift introduced by the finite accuracy of the calculations.
Sub-carrier phase adjustment can be performed
every line, every eight field, every four field, or
every two field (Register2 bitsvalrst[1:0]).
The color reference burst is inserted so as to
always start with a positive zero crossing of the
subcarriersine wave. The first and last half-cycles
have a reduced amplitude so that the burst envelope starts and ends smoothly.
The burst contai ns 9 or 10 sine cycles of
4.43361875MHzor3.579545MHzaccordingto the
standard programmed in the Control Register
(Reg. 0, bits std[1:0]), as follows :
- Two strategies exist for burst insertion: one is tomerely
gateand shapethe subcarrierfor burstinsertion,the other
is more elaborated and is to always start the burstwith a
positive-going zero crossing. In the first case the phase
of the subcarrier when the burst starts is not controlled,
with the consequencethat some of its first and last cycles
are more heavi ly distorded. The second solution
guaranteessmooth startand endofburst witha maximum
of undistorded burst cycles and can only be beneficial to
chroma decoders, it is the solution implemented in the
STV0118.
- While the first option gave constant burst start time but
uncontrolled initial burst phase, the second solution
guarantees start on a positive-going zero crossing with
the consequence that two burst start locations arevisible
over successive lines, according to the line parity.This is
normal and explained below.
- In NTSC, the relation between subcarrier frequency and
line length creates a 180o subcarrier phase difference
(with respect to the horizontal sync) from one line to the
next according to the line parity. So if the burst always
startswith thesame phase (positive-goingzerocrossing),
this means the burst will be inserted at time Xor at time
/2 after the horizontal sync tip according to the
X+T
NTSC
line parity, where T
NTSC burst.
- With PAL, a similar rationale holds, and again there will
be two possible burst start locations. The subcarrier
phasedifference (withrespect tothehorizontalsync) from
one line to the next in that case is either 0 or 180o with
the following series: A-A-B-B-A-A-...-etc. where A
denotes ‘A-type’ bursts and B denotes ‘B-type’ bursts,
A-type and B-type being 180° out of phase with respect
to the horizontal sync. So 2 locations are possible, one
for A-type,the other forB-type (see Figure 8).
- This assumes a periodic reset of the subcarrier is
automatically performed (see bits valrst[1:0] in Reg 2).
Otherwise, over severalframes, the start of burst will drift
within an interval of one a subcarrier’s cycle. THIS IS
NORMAL and means the burst is correctly locked to the
colors encoded. Theequivalent effect witha gatedburst
approachwould be the following : thestart locationwould
be fixed but the phase with which the burst starts (with
respect to the horizontal sync) would be drifting.
IV.9 - LuminanceEncoding
The demultiplexed Y samples are band-limited
and interpolated at CKREFclock rate. The resulting luminance signal is properly scaled before
insertion of any Closed-captions, CGMS or
Teletext data and synchronization pulses.
is the duration of one cycle of the
NTSC
Theinterpolationfiltercompensatesforthesin(x)/x
attenuationinherent to D/A conversionand greatly
simplifies the outputstagefilter(referto Figures15
to17 for characteristiccurves).
Figure 15 : Luma Filtering Including DAC
Attenuation
0
-5
-10
-15
-20
-25
-30
Amplitude (dB)
-35
-40
012345679108111213
6
Frequency (x10
) (Hz)
Figure 16 : Luma Filtering with 3.58MHz Trap,
IncludingDAC Attenuation
0
-5
-10
-15
-20
-25
-30
Amplitude (dB)
-35
-40
012345679108111213
6
Frequency (x10
) (Hz)
Figure 17 : Luma Filtering with 4.43MHz Trap,
IncludingDAC Attenuation
0
-5
-10
-15
-20
-25
-30
Amplitude (dB)
-35
-40
012345679108111213
6
Frequency (x10
) (Hz)
0118-22.EPS
0118-23.EPS
0118-24.EPS
16/42
Page 17
IV- FUNCTIONALDESCRIPTION(continued)
In addition, the luminance that is added to the
chrominanceto createthe compositeCVBS signal
can be trap-filtered at 3.58MHz (NTSC) or
4.43MHz (PAL). This allows to cope with application oriented towards low-end TV sets which are
subject to cross-color if the digital source has a
wide luminance bandwidth (e.g. some DVD
sources).Notethat thetrapfilterdoes notaffect the
S-VHSluminance output nor the RGB outputs.
A7.5 IRE pedestal can be programmedif needed
withall standards(seeReg1,bitsetup).Thisallows
in particular to encode Argentinian and non-Argentinian PAL-N, or Japanese NTSC (NTSC with
no set-up).
A programmable delay can be inserted on the
luminance path to compensate any chroma/luma
delay introduced by off-chip filtering (chroma and
lumatransitionsbeingcoincidentattheDACoutput
withdefault delay) (Reg3, bits del[2:0]).
IV.10 - ChrominanceEncoding
U and V chroma components are computed from
demultiplexedCb, Cr samples. Beforemodulating
thesubcarrier,theseare band-limitedand interpolated at CKREF clock rate.This processingeases
the filtering following D/Aconversion and allows a
more accurate encoding.A set of 4 differentfilters
is availablefor chroma filtering to fit a wide variety
of applications in the different standards and includefiltersrecommendedbyITU-RRec624-4and
SMPTE170-M.The available 3dB bandwidthsare
1.1, 1.3, 1.6 or 1.9MHz, refer to Figures 18 to 22
for the various frequency responses (Reg1, bits
flt[1:0]).
Thenarrowerbandwidthsareusefulagainstcrossluminanceartefacts,the widerbandwidthsallowto
keep higher chroma contents and then an improvedimage quality.
IV.11 - Composite Video Signal Generation
The composite video signal is created by adding
the luminance (after optional trap filtering, Reg 3
bits entrap and trap_pal) and the chrominance
components.Asaturationfunctionisincludedinthe
adder to avoid overflow errors should extreme
luminance levels be modulated with highly saturated colors (this does not correspond to natural
colors but may be generated by computers or
graphicengines).
A‘colorkilling’function isavailable(Reg 1, bitcoki)
wherebythe compositesignal contains no chrominance, i.e. replicates the trap-filtered luminance.
STV0118
Note that this function does not suppress the
chrominanceon the S-VHS outputs (nevertheless
suppressing the S-VHS chrominance is possible
using bit “bkg_c”in Reg 5).
After demultiplexing, the Cr and Cb samples feed
a 4 times interpolation filter. The resulting baseband chroma signal has a 2.45MHz bandwidth
(Figure 23) and is combinedwith the filtered luma
componenttogenerateR,G,Bsamplesat27MHz.
Figure23 : RGBChroma Filtering
0
-5
-10
-15
-20
-25
Amplitude (dB)
-30
-35
-40
0 2 4 6 8 101214
Frequency(x10
6
) (Hz)
6
) (Hz)
6
) (Hz)
IV.13- ClosedCaptioning
Closed-captions(or data from an Extended Data
Serviceas defined by the Closed-Captions specification)can be encodedby thecircuit. The closed
caption data is delivered to the circuit through the
2
I
C interface. Two dedicated pairs of bytes (two
bytes per field), each pair preceded by a clock
run-in anda start bit canbe encodedand inserted
on the luminance path on a selected TV line. The
ClockRun-In and Start code are generatedby the
STV0118.
Closed-captiondata registersare double-buffered
so that loading can be performed anytime, even
duringline 21/284 or any otherselected line.
0118-28.EPS
Userregister39 (resp. 41) containsthe firstbyte to
send(LSBfirst)afterthestartbitonthe appropriate
TVline in field1 (resp.field2),anduserregister40
(resp. 42) contains the second byte to send. The
TV line number where data is to be encoded is
programmble (Reg. 37, 38). Lines that may be
selectedinclude those usedby the StarSightdata
broadcastsystem.Closed-captionsdatahaspriority over CGMSprogrammed for the sameline.
Theinternal Clock Run-Ingenerator is based on a
DirectDigital FrequencySynthesizer. The nominal
instantaneousdatarateis503.5kbit/s(i.e. 32times
theNTSC line rate). DataLOWcorrespondsnominallyto 0IRE, data HIGHcorrespondsto 50 IREat
the DAC outputs. Refer to Figure 24.
0118-29.EPS
When closed-captioning is on (bits cc1/cc2 in
Reg.1),the CPU shouldloadthe relevantregisters
(reg.39 and 40, or 41 and42) once everyframeat
most(althoughthere is in fact some margin due to
thedouble-buffering).Twobitsare setin thestatus
registerin case of attemptsto loadthe closed-caption data registers too frequently, these can be
used to regulateloading rate.
Figure 24 : ExampleClosed-captionWaveform
300
250
200
150
LSB
100
50
0118-30.EPS
0
10µs
27.35µs
13.9µs
7 cycles
of 504kHz
Transition
Time : 220ns
61µs
t
0118-31.EPS
18/42
Page 19
IV- FUNCTIONALDESCRIPTION(continued)
The closed caption encoderconsiders that closed
caption data has been loaded and is valid on
completion of the write operation into register 40
forfield1,intoregister42forfield2.Ifclosedcaption
encodinghasbeenenabledandnonew databytes
have been written into the closed caption data
registerswhentheclosedcaptionwindow startson
theappropriateTV line,then thecircuitoutputstwo
US-ASCIINULLcharacterswithoddparityafterthe
start bit.
IV.14 - CGMSEncoding
CGMS (Copy Generation Management System also known as VBID and described by standard
CPX-1204 of EIAJ) data can be encoded by the
circuit. Three bytes (20 significant bits) are deliveredtothechipviatheI2Cinterface.Tworeference
bits (‘1’ then ‘0’) are encodedfirst, followedby 20
bitsof CGMSdata (includinga CyclicRedundancy
Checksequence,not computedby the deviceand
supplied to it as part of the 20 data bits). The
reference bits are generated locally by the
STV0118.Refer to Figure 25 for a typical CGMS
waveform.
WhenCGMS encodingisenabled,the CGMS(see
bit encgms in Reg 3) waveform is continously
present once in each field, on lines 20 and 283
(SMPTE-525line numbering).
TheCGMS data registeris double-buffered,which
means that it can be loaded anytime (even during
line 20/283) without any risk of corrupting CGMS
data that could be in the process of being encoded.The CGMS encoder considers that new
CGMSdata has been loaded and is valid on completionof the writeoperation into register33
Figure25 : ExampleCGMSWaveform
300
250
200
150
LSB
100
50
0
11µs
Word 0
6 bits
Bit 1Bit 20
t
48.7µs
Word 1
4 bits
Word 2
4 bits
CRCC
6 bits
STV0118
IV.15- TeletextEncoding
TheSTV0118is ableto encodeTeletextaccording
to the “CCIR/ITU-R Broadcast Teletext System B”
specif ication, also known as “World System
Teletext”.
In DVB applications, Teletext data is embedded
withinDVBstreamsasMPEGdatapackets.Itisthe
responsibility of a “TransportLayer Processing” IC
(or demultiplexer), like SGS-Thomson’s ST20based“TP2”,to sortout incomingdatapacketsand
inparticulartostoreTeletextpacketinabuffer,which
thenpassesthem to the STV0118on request.
IV.15.1- Signals Exchanged
The STV0118and the Teletext buffer exchange 2
signals: TTXS (Teletext Synchronization) going
fromthe STV0118to theTeletextBuffer and TTXD
(TeletextData) goingfrom the TeletextBuffertothe
STV0118.
The TTXS signal is a request signal generated on
selected lines. In response to this signal, the
Teletextbufferisexpectedto send360Teletextbits
to the STV0118for insertion of a Teletextline into
the analog video signal.
Thedurationof theTTXSwindowis 1402reference
clockperiods(51.926µs),whichcorrespondsto the
duration of 360 Teletext bits (see Transmission
Protocolbelow).
Following the TTXS rising edge the encoder expectsdata fromtheTeletextbufferaftera programmable number (2 to 9) of 27MHz master clock
periods.Dataistransmittedsynchronouslywiththe
master clock at an average rate of 6.9375Mbit/s
accordingto the protocol described below. It consists, in orderof transmission, of 16 Clock Run-In
bits, 8 Framing Code bits and the 336 bits (42
bytes)that represent one Teletext packet.
IV.15.2- TransmissionProtocol
In order to transmit the Teletext data bits at an
average rate of 6.9375Mbit/s, which is about
1/3.89 times the master clock frequency,the followingscheme is adopted:
The 360-bit packet is regarded as nine 37-bit sequences plus one 27-bit sequence. In every sequence, each Teletextdata bit is transmitted as a
successionof4identicalsamplesat27 Msample/s,
exceptfor the 10th, 19th, 28th and 37th bitsof the
sequence which are transmitted as a succession
of 3 identical samples.This protocol is compatible
withSGS-Thomson’sST-20 based TranportLayer
IC (“TP2”).
0118-32.EPS
19/42
Page 20
STV0118
IV- FUNCTIONALDESCRIPTION(continued)
Figure26 : “TTXSRising” to “First Valid Sample”Delay for txdl[2:0] = 0
CKREF
TTXS
TTXD
(txdl[2:0] + 2) T
NotValidBit 1Bit 2
CKREF
IV.15.3 - Programming
IV.15.3.1- ’TTXSRising’ to ’First Valid
Sample’Delay Programming
TheencoderexpectstheTeletextbuffertoclockout
the first Teletextdata sampleon the (2+N)thrising
edge of the master clock followingthe risingedge
of TTXS (Figure 26 depicts this graphically for
N=0). ’N’ is programmablefrom 0 to 7 (i.e. overall
delayis programmablefromTWO to NINE 27MHz
cycles)via 3 dedicatedbits locatedin the ConfigurationRegister4 : “txdl[2:0]”.
IV.15.3.2- TeletextLine Selection
Five dedicatedregisters allowto programTeletext
encodingin various areas of the Vertical Blanking
Interval(VBI) of eachfield. Atotal of 4 such areas
(i.e. blocks of contiguous Teletext lines) can independently be defined within the two VBIs of one
frame(e.g.2blocksineachVBI,or3 blocksinfield1
VBI and one in field2 VBI, etc.). Further, under
certaincircumstances,it ispossible to define up to
4 areas in each VBI.
Programming isperformed using4 “Teletext Block
Definition” registers (TTXBD1, TTXBD2,
TTXBD3,TTXBD4)and a “TeletextBlockMapping”
register(TTXBM). Refer to the descriptionof user
registers34 to 38 fordetails.
IV.15.4 - TeletextPulse Shape
Theshapeandamplitudeofa singleTeletextpulse
aredepictedin Figure27,itsrelativepowerspectral
density is given in Figures 28 and 29 and is substantiallyzero at frequencies above 5MHz, as re-
quiredby the WorldSystemTeletextspecification.
Figure 27 : Shape and Amplitudeof a Single
An external micro-controller controlsthe STV0118
viaanI
registers. The I
2
C protocol”(upto 400kHz- andpotentiallymore).
I
Thedefault I
C Bus
2
Cbusby writingintoorreadingfrominternal
2
C interface supports the “fast
2
C addresses of theSTV0118 are :
- in write mode : “01000000”(40 hex)
- in read mode : “01000001”(41 hex)
After a hardware reset, it is these addresses that
the STV0118recognizes.
It is possibleto modify the default I
tiing the TTXS/CSI2C pin to logic ‘1’ and validating the change by writing into a dedicated bit in
Register 6.
Inthat case,the STV0118hasa new I
- in writemode : “01000010”(42 hex)
- in readmode : “01000011”(43hex)
OncetheI
2
C addresshas beenchanged,it cannot
bemodifed anymoreuntil thenext hardwarereset.
Note that these I
those used by the STV0117/STV0117A/STV0119
0118-36.EPS
(others SGS-THOMSON PAL/NTSC Digital En-
2
coder).
It is expected that I
mally be needed for dual encoding applications.
Theexact procedure to changethe I
isdetailedbelow,in thesectionthat dealswith dual
encodingapplications.
Write and read operations are described in Figures30 and 31.
Figure31 : I2C ReadOperation(default address at power-on,CSI2C≠’1’)
SCL
SDA
SCL
SDA
Start
R/W
I2C SlaveAddress 40h
R/W
I2C SlaveAddress 41h
A7 A6 A5 A4 A3 A2 A1 A0
STV0119
D7 D6 D5 D4 D3 D2 D1 D0
ACKby
STV0119
LSB Address
Data Byte 1
ACKby
STV0119
ACK by
micro
StopACK by
D7 D6 D5 D4 D3 D2 D1 D0
Data Byte nStart
DataByte 1
ACKby
STV0119
ACK by
micro
ACK by
STV0119
Stop
0118-37.EPS
0118-38.EPS
21/42
Page 22
STV0118
IV- FUNCTIONALDESCRIPTION(continued)
IV.17- Dual Encoding Application with 54Mbit/s YCrCb Interface
The STV0118 is able to interface with SGSTHOMSON’s MPEG decoders capable of supplying a 5 4-Mbit/ s YCrCB multiplex, like the
STi3520M. This multiplex embeds two 27Mbit/s
YCrCbvideo streams,one with OSD contents and
the other without OSD content (see Figure 32).
Note that the frequency of the reference clock
supplied to the encoder is still 27MHz, only both
edgesare usedin the interface.
The MPEG decoder being usually slaved to the
encoder,if two encodersare to beusedin parallel,
oneof themmust be masterand the other must be
slave. Figure 33 shows a typical dual encoding
application(althoughotherapplicationswhere two
STV0118’sare slaveare possible).
It is also necessary to be able to control independently the encoders. One solution is to have
two separate I
runningfromthe microcontroller(thisis possibleon
SGS-THOMSON’s ST20, which features two I
busses),another solutionis to change the I
2
C busses (one for each encoder)
2
C chip
2
C
addressof one of the STV0118.
This can be donewith the followingprocedure :
- If no Teletext is required, tie pin TTXS/ CSI2Cof
Figure32 : 54Mbit/sDual YCRCB Stream
the 1st encoderto ‘0’.
- If Teletext encoding is needed, connect the
TTXS/CSI2Cpin of the first encoder to boththe
TTXS input pin of the Teletext Buffer / Transport
IC (e.g. SGS-Thomson’sTP2) and a pull-down
resistor (needed for power-on configuration).
- Connect TTXS/CSI2C of the second encoder to
logic ‘1’.
- Before performingany Teletext-relatedprogramming, set to ‘1’ bit “chgi2c” in configurationregister6.
Onhardware reset, both encoders have the same
defaultI
2
C address(40-41hex).When bit “chgi2c”
toggles to ‘1’, the I
(withTTXS/CSI2Cpulledlow) keepsunchangedat
40-41hex, whilst the I
encoder (with TTXS/CSI2C = ‘1’) switches to 4243hexand can no more be changeduntil the next
hardwarereset.
2
After I
C address change, the second encoder
mustbeprogrammedtochoosetheYCRCbincomingdata streamon thefalling edge ofCKREF (see
bit ’nosd’in configurationregister 3).
This patented feature of the STV0118 offers the
possibility to cut the cost of the application by
suppressingthe need for a VCXO.
Ideally, the master clock used on the application
board and fed to the MPEG decoding IC would
haveexactly samefrequencyas theclock thatwas
used when the MPEG data was encoded. Obviously this is not realistic; up to now a solution
commonlychosenistodynamicallyadjusttheclock
onthe boardas closeto the‘ideal’clockas possible
with the help of time stamps embeddedwithin the
MPEG stream. Such a kind of tracking often involvesthe use of a VCXO : when the MPEG data
bufferfillsuptomorethansomethresholdthe clock
frequency is increased, when it empties down to
some other threshold the clock frequency is lowered.
The STV0118 offers an alternative, cost-saving
solution: by programming the two bits jump and
dec_ninc in configuration Reg6, the STV0118 is
able to reduce or increase the length of some
framesin a waythat will not introducevisible artefacts (even if comb-filtering is used). These bits
should be set according to the level of the MPEG
data buffer. Refer to Section VI.2 Register 6,
Register 9 and Registers 21-22-23 for complete
bit description.
Operationwith the STV0118as sync master is as
follows:
- If the MPEG data buffersfills uptoo much:set bit
“jump”to‘1’and bit“dec_ninc”to ‘1’.TheSTV0118
will reduce the length of the current frame (Bit
“jump”will thenautomaticallybe resetto ‘0’).
- IftheMPEGdatabuffersemptiestoomuch:set bit
“jump”to ‘1’andbit “dec_ninc”to‘0’.TheSTV0118
will increase the length of the current frame (Bit
“jump”will then automaticallyberesetto ‘0’).
These operationscan be repeateduntil the MPEG
data buffer is insideits fixed limits.
It is also possible to use the line skip/repeatcapabilityin non-interlacedmode.
This functionalityof the STV0118is alsoavailable
in slave mode, in this case the sync signals supplied to the STV0118must be in accordance with
the modifiedframe lengthes programmed.
IV.19- CVBS, S-VHS and RGB Analog Outputs
Four out of six video signals (composite CVBS,
S-VHS(Y/C)and RGB)canbedirectedto 4 analog
output pins through 9-bit D/Aconverters operating
at thereferenceclock frequency.
The available combinations (see bit ‘rgb_nyc’ in
Reg5) are :
S-VHS(Y/C) + CVBS + CVBS1
or : R, G, B + CVBS1.
Asingle external analog power supply pair is used
for all DACs, but two independentpairs of current
and voltage references are needed. Each current
referencepin is normallyconnectedexternallyto a
resistor tied to the analogue ground, whilst each
voltage reference pin is normally connected to a
capacitancetied to the analogueground.
The internalcurrent sourcesare independentfrom
the positive supply, thanks to a bangap, and the
consumptionof theDACs isconstantwhateverthe
codes converted.
Any unused DAC may be independentlydisabled
by software, in which caseits outputis at ‘neutral’
level(blanking for luma andcompositeoutputs,no
color for chroma output, black for RGB outputs).
For applications where a single CVBS output is
required, the RGB/CVBS+S-VHS Triple DAC
should be disabled and Pins I
REF(RGB)
, VR_RGB
tied to analog power supply.
24/42
Page 25
STV0118
V - CHARACTERISTICS
V.1 - Absolute MaximumRatings
SymbolParameterValueUnit
V
V
V
I
REF
T
T
P
V.2 - ThermalData
SymbolParameterValueUnit
R
th(j-a)
V.3 - DC Electrical Characteristics
T
amb
SymbolParameterTest ConditionsMin.Typ.Max.Unit
SUPPLY
V
V
I
DDA
I
DIGITAL INPUTS
V
V
C
SDA OUTPUT
V
DIGITAL OUTPUT
V
V
D/A CONVERTER
RI
V
ILELF Integral Non-linearityRI
DLELF Differential Non-linearityRI
Notes : 1. This product withstands 1.4kV (The MIL883C Norm requires 2.0kV).
DC Supply Voltage-0.3, 4.0V
DDx
Digital Input Voltage-0.3, VDD+ 0.3V
IN
Digital Output Voltage-0.3, VDD+ 0.3V
OUT
Analog Input Reference Current2mA
Operating Temperature0, +70
oper
Storage Temperature-40, +150
stg
Total Power Dissipation500mW
tot
DC Junction-Ambient Thermal Resistance
Typ.76°C/W
with sample soldered on a PCB
=25°C/70°C, V
Analog Positive Supply Voltage3.03.33.6V
DDA
Digital Supply Voltage3.03.33.6V
DD
DDA=VDD
Analog Current ConsumptionRI
Digital Current Consumption203550mA
DD
Input VoltageLow level (any other pins)0.8V
IL
Input Voltage
IH
SCL and SDA
Except SCL and SDA
Input Leakage Current
I
L
Input Pins (see note 2)
Bi-directional Pins
Input Capacitance
IN
Input Pins
Bi-directional Pins
Output VoltageLow level, IO= 2mA0.4V
L
Output VoltageHigh level (IOH= -4mA)2V
OH
Output VoltageLow level (IOL= 4mA)0.6V
OL
Resistance for reference Current
REF
Source for 3 D/A Converters
Output Voltage DynRI
O
DAC to DAC VOmaxcode(tri-DAConly) RI
This product withstands 150V (The EIAJ Norm requires 200V).
2. The highvalue for input Pins is due to internal pull-down resistance.
=3.3V,unless otherwisespecified
=1.2kΩ,RL= 200Ω,
REF
= 50pF, CKREF = 27MHz,
C
L
= 3.6V autotest mode,
V
DD
static input signals
High level (any other pins)
min or VIHmax
V
IL
I
REF=VREF
REF
(Max. code - Min. Code)
REF
REF
REF
/RI
REF,VREF
= 1.2kΩ,RL= 200Ω
= 1.2kΩ,RL= 200Ω3%
= 1.2kΩ,RL= 200
= 1.2kΩ,RL= 200
2050mA
2.0
2.0
-10
-10
0.1
5
= 1.12V typ.1.2k
0.951.10V
Ω±
Ω±
0.5LSB
4.5
V
DD
8010µA
1LSB
o
o
µA
pF
pF
C
C
V
Ω
PP
25/42
Page 26
STV0118
V - CHARACTERISTICS (continued)
V.4 - ACElectrical Characteristics
=25°C/70°C, V
T
amb
DDA=VDD
SymbolParameterTest ConditionsMin.Typ.Max.Unit
DIGITAL INPUT (YCRCB[7:0], HSYNC, VSYNC/ODDEVEN)
tsuInput Data Set-up TimeCKREF rising edge, CKREF = 27MHz6ns
thoInput Data Hold TimeCKREF rising edge, CKREF = 27MHz3ns
ACTIVE PERIOD FOR NRESET
tRSTLInput Low Time200ns
REFERENCE CLOCK : CKREF
1/tC_REFClock Frequency27MHz
tD_REFClock Duty Cycle35*65*%
tR_REFClock Rise Time5ns
tF_REFClock Fall Time5ns
NTSC-M: lines[1..9],[263(half)..272](525-SMPTE)
PAL-M: lines [523..6],[260(half)..269](525-CCIR)
other PAL: lines [623(half)..5],[311..318](625-CCIR)
This mode allows preservation of VBI data embedded within incoming YCrCb, e.g.
Teletext (lines [7..22] and [320..335]), Wide Screen signalling (full line 23), Video
Programing Service (line16), etc.).
1(‘full blanking’) Alllines inside VBI are blanked
NTSC-M: lines[1..19], [263(half)..282](525-SMPTE)
PAL-M: lines [523..16],[260(half)..279](525-CCIR)
other PAL: lines [623(half)..22],[311..335](625-CCIR)
Note : blkli must be set to ’0’ when closed captions and areto be encoded on following lines :
- in 525/60 system: before line 20(SMPTE) or before line 283(SMPTE)
- in 625/50 system: before line 23(CCIR) or before line 336(CCIR)
For CGMS and Teletextencodings, blkli value is nottaken into account.
flt[1:0]U/V Chromafilter bandwidthselection
(Referto FunctionalDescription,Section IV.10andFigures 4 and 5)
flt1
flt0
3dB Bandwidth
0
0
f-3 = 1.1MHz
0
1
f-3 = 1.3MHz
(*)
1
0
f-3 = 1.6MHz
1
1
f-3 = 1.9MHz
sync_ok Availability ofsync signals (analog and digital)in case of input synchronizationloss with no
free-runactive (i.e. freerun=0)(Refer to FunctionalDescription,Section IV.5)
(*)01No synchro output signals
Outputsynchros available on YS, CVBS and, when applicable,HSYNC (ifoutput port),
ODDEVEN(if output port), i.e same behavioras free-runexcept that videooutputs are
blankedin the active portionof the line
Caution : This bitis takeninto account in ODDEV-only, VSYNC-onlyor‘F’based slavemodes andisirrelevantto other
synchronization modes.
cokiColor killer (Refer to FunctionalDescription,Section IV.11)
nintrlNon-interlacedmode select (Refer to Figures 3, 5 and7)
(*)01Interlacedmode (625/50 or 525/60 system)
Non-interlacedmode(2x312/50or 2x262/60system)
Note : ‘nintrl’update is internallytaken into account on beginning of next frame.
enrstCyclicupdate of DDFSphase
(*)01No cyclic subcarrierphase reset
Cyclicsubcarrier phase reset dependingof valrst1 and valrst0 (see below)
burstenChrominanceburst control
01Burstis turned off on CVBS (and CVBS1), C andRGB outputs are not affected
(*)
Burstis enabled
selrstSelects set of reset values for Direct DigitalFrequency Synthesizer
(*)01Hardware resetvalues for phase and incrementof subcarrieroscillator
(see descriptionof registers10 to 14 for values)
2
I
C loadedreset valuesselected (see contentsof Registers10 to 14)
rstoscSoftware phasereset of DDFS(Direct Digital FrequencySynthesizer)
(*)01inactive
a 0-to-1 transition resets the phase of the subcarrierto either the hard-wireddefault
phase valueor the value loadedin Register13-14 (accordingto bit ‘selrst’)
Note : Bit ‘rstosc’is automatically set back to ‘0’ after the oscillator reset has been performed.
valrst[1:0] Note : valrst[1:0]is taken into account only if bit ‘enrst’ is set
valrst1 valrst0 Selection
(*)0
0
1
1
0
1
0
1
Automaticreset of the oscillatorevery line
Automaticreset of the oscillatorevery 2nd field
Automaticreset of the oscillatorevery 4th field
Automaticreset of the oscillatorevery 8th field
Resettingtheoscillatormeans hereforcingthe valueof theaccumulatorphaseto itsnominalvalueto avoid
accumulatingerrors due to the finite number of bits usedinternally.Thevalue to which the accumulatoris
reset is either the hard-wireddefault phase value or the value loaded in Register 13-14 (according to bit
‘selrst’),to which a 0°,90°, 180°,or 270°correction is applied according to the field and line on whichthe
resetis performed.
30/42
Page 31
STV0118
VI- REGISTERS(continued)
VI.2- RegisterContents and Description(continued)
(*)= DEFAULTmode when NRESET pin is active(LOW level)
Note : Bit ‘softreset’is automatically reset after internalreset generation.
Software reset is active during 4 CKREF periods. When softreset is activated, all the device is reset as with
hardware reset except for the first six user registers (configurations) and for registers 10 up to 14
(increment and phase of oscillator), 31-33, 34-37 and 39-42.
jump, dec_ninc, free_jump
jump dec_ninc free_jump
000Normal mode (no line skip/insertcapability)
CCIR: 313/312 or 263/262
non-interlaced: 312/312or 262/262
0x1Manual mode fo r l ine insert (“dec_ninc” = 0) or skip
(“dec_ninc”= 1) capability.
Both fields of all the frames following the I
modifiedaccordingto “lref”and“ltarg”bitsofregisters21-22-23
(bydefault,“lref”= 0and“ltarg”=1 whichleadsto normalmode
above).
100Automatic lineinsert mode.
The2
nd
fieldof theframefollowingthe I2C writingis increased.
Lineinsertionis done afterline 245 in525/60and afterline 330
in 625/50. “lref” and “ltarg” bits are ignored.
110Automatic lineskip mode.
The2
nd
fieldofthe framefollowingthe I2Cwrittingisdecreased.
Line suppression is done after line 245 in 525/60 and after
line330 in 625/50.“lref” and “ltarg”bits are ignored.
1x1Not be used
Notes :
- Refer to Functional Description (Section IV.18)
- bit “jump” is automatically reset after use.
2
C writing are
chgi2cChip addressselection
(*)01Chip address: write = 40hex; read = 41hex
Chip address: write = 42hex; read = 43hex
Note : Setting this bit to 1 changes the chip address provided that pin ttxs/csi2c is tied to Vdd when the 0-to-1
transition occurs. Refer to sections IV.16and IV.17.The new address is valid until the next hardware reset.
maxdynMax dynamicmagnitudeallowed on YCrCb inputs for encoding
(Refer to FunctionalDescription,Section IV.6).
(*)0110hex to EBhex for Y,10hex to E0hex for chrominance(Cr,Cb)
01hex to FEhexfor Y, Cr and Cb
Note : In any case, EAV and SAVwords are replacedby blankingvalues before being fed to the luminance and
chrominace processings
REGISTER_7 and 8 : Reserved
34/42
Page 35
STV0118
VI- REGISTERS(continued)
VI.2- RegisterContents and Description(continued)
(*)= DEFAULTmode when NRESET pin is active(LOW level)
hokHammingdecoding of frame sync flag embedded within ITU-R656/D1 compliant YCrCb
streams.
01Consecutiveerrors
(*)
atfrFrame synchronizationflag (slavemode only)
(*)01Encodernot synchronized
buf2_freeClosed caption registersaccess conditionfor field 2
(*)
Asingle or noerror
Note : signal quality detector isissued from Hamming decoding of EAV,SAVfrom YCrCb
Encodersynchronized
(refer to FunctionalDescription,Section IV.13)
Closed caption data for field 2 is buffered before being output on the relevant TV line;
buf2_free is reset if the buffer is temporarily unavailable. If the microcontroller can
guaranteethatregisters41 and42 (cccf2) arenever writtenmore thanonce betweentwo
frame reference signals, then bit ‘buf2_free’will always be true (set). Otherwise, closed
captionfield2 registersaccess might be temporarilyforbidden by resettingbit ‘buf2_free’
until the next field2 closed captionline occurs.
Note that this bit is false (reset) when 2 pairs of data bytes are awaiting to be encoded,
and is set back immediately after one of these pairs has been encoded (so at that
time,encodingof the last pair of bytes is still pending)
Reset value = 1 (access authorized)
buf1_freeClosed caption registersaccess conditionfor field 1
These registers contain the 24-bit increment used by the DDFS if bit ‘selrst’ equals ‘1’ to generate the
frequencyof thesubcarrieri.e. theaddressthatis suppliedtothe sineROM. It thereforeallowstocustomize
the subcarrierfrequencysynthesized.Refer to Functional Description, Section IV.7.
1 LSB~ 1.6 Hz
Theprocedure to validate usage of these registers instead of the hard-wiredvalues is the following:
- Load the registerswith the requiredvalue
- Set bit ‘selrst’to 1 (Reg2)
- Performa softwarereset (Reg 6)
Notes:The values loaded in Reg10-11-12are taken into account after a software reset, and ONLYIF bit
‘selrst’=’1’(Reg. 2)
These registers arenever resetand must be explicitlywritten into to containsensible information.
On hardware reset (=> ‘selrst’=0) or on soft reset with selrst=’0’, the DDFS is initalized with a
hardwiredincrement, independent of Registers 10-12. These hardwired values being out of any
user register these cannotbe read out of theSTV0118.
These values are :
ValueFrequencySynthesizedRef.Clock
d[23:0] : 21F07C hexa for NTSC M (*)f = 3.5795452MHz27MHz
d[23:0] : 2A098B hexa forPALBGHINf = 4.43361875MHz27MHz
d[23:0] : 21F694hexa for PALNf = 3.5820558MHz27MHz
d[23:0] : 21E6F0 hexa for PALMf = 3.57561149MHz27MHz
‘NTSC-4.43’canbe obtained with d[23:0]value likefor PALBGHIbutwith standardfixedas NTSC.
REGISTERS_13_14- Phase_dfs : Static phase offset for digital frequencysynthesizer(10 bits only)
Undercertaincircumstances(detailedbelow),these registerscontain the10 MSBsof the value withwhich
the phase accumulator of the DDFS is initialized after a 0-to-1 transition of bit ‘rstosc’(Reg 2), or after a
standardchange,or whencyclicphasereadjustmenthasbeen programmed(seebits valrst[1:0]of Reg2).
The 14 remaining LSBs loaded into the accumulatorin these cases are all ‘0’s (this allows to define the
phasereset value with a 0.35°accuracy).
Theprocedure to validate usage of these registers instead of the hard-wiredvalues is the following:
- Load the registerswith the requiredvalue
- Set bit ‘selrst’to 1 (Reg2)
- Performa softwarereset (Reg 6)
Notes:Registers13-14 are neverreset and mustbe explicitlywritteninto to contain sensibleinformation.
If bit ‘selrst’=0 (e.g. after a hardware reset) the phase offset used to reinitialize the DDFS is the
hard-wiredvalue. The hard-wired values being out of anyregister,they cannot be read out of the
STV0118.
These are :
- D9C000hexfor PALBDGHI, N, M
- 1FC000hexfor NTSC-M
36/42
Page 37
VI- REGISTERS(continued)
VI.2- RegisterContents and Description(continued)
(*)= DEFAULTmode when NRESET pin is active(LOW level)
ThesearefourTeletextBlockDefinitionregisters,usedinconjunctionwithReg38(TeletextBlockMapping).
Eachof these registersdefines a start line (TXBSx[3:0])and an end line(TXBEx[3:0]). [TXBSx = Teletext
BlockStart for block x, TXBEx= TeletextBlock End forblock x]
Whenapplying to field1:TXBSx[3:0]=0codes line 7,
...
TXBSx[3:0]=icodes line 7+i,
...
TXBSx[3:0]=15dec(‘1111’bin)codes line 7+15=22
Whenapplying to field2:TXBSx[3:0]=0codes line 320,
...
TXBSx[3:0]=icodes line 320+i,
...
TXBSx[3:0]=15dec(‘1111’bin)codes line 320+15=335
(ITU-R601/625 line numbering)
DEFAULT value: none, registers 34-37 are never reset.
(txmf1stands for ’TeletextBlock Mappingto field1, txmf2 stands for ’Teletext BlockMapping to field2)
This register allows to map the blocks of Teletext lines definedby registers 34 to 37 to either field1,field2
or both :
Its defaultvalue is “00000000”
txmf1.Ndefines whether txbdN (Nth teletext block, see reg34-37above) applies to field 1,
txmf2.Ndefines whether txbdN (Nth teletext block, see reg34-37above) applies to field 2.
In other words, if txmf1.N=1 then Teletext will be encoded in field 1 from the line defined by txbsN.[3:0]
(seeabove) to the line definedby txbeN.[3:0].
Similarly, if txmf2.N=1thenTeletext will be encodedin field 2 fromthe line definedtxbsN.[3:0](see above)
to the line definedby txbeN.[3:0].
38/42
Page 39
STV0118
VI- REGISTERS(continued)
VI.2- RegisterContents and Description(continued)
(*)= DEFAULTmode when NRESET pin is active(LOW level)
REGISTER_39-40- cccf1: Closedcaption characters/extendeddata for field 1
Firstbyte to encodein field1:
MSBLSB
register_39opc11c117c116c115c114c113c112c111
opc11Odd-paritybit of US-ASCII 7-bit characterc11[7:1]
Secondbyte to encode in field1:
MSBLSB
register_40opc12c127c126c125c124c123c122c121
opc12Odd-paritybit of US-ASCII 7-bit characterc12[7:1]
Defaultvalue : none, but closed captions enablingwithout loading these registers will
issuecharacter NULL. Registers 39-40 are neverreset.
REGISTER_41-42: cccf2: Closedcaption characters/extendeddata for field 2
Firstbyte to encodein filed2:
MSBLSB
register_41opc21c217c216c215c214c213c212c211
opc21Odd-paritybit of US-ASCII 7-bit characterc21[7:1]
Secondbyte to encode in field2 :
MSBLSB
register_42opc22c227c226c225c224c223c222c221
opc22Odd-paritybit of US-ASCII 7-bit characterc22[7:1]
Defaultvalue : none but closed captions enabling without loading theseregisters will
issuecharacter NULL. Registers 41-42 are neverreset.
REGISTER_43 - cclif1 : Closed caption/extended data line insertion for field 1
TV line number where closed caption/extendeddata is to be encoded in field 1 is programmable through
the following register :
MSBLSB
register_43xxxxxxxxxxxxl1_4l1_3l1_2l1_1l1_0
Default00001111
- 525/60system : (525-SMPTEline number convention)
Only lines 10 through 22 should be usedfor closed captionor extendeddata services(line 1 through9
contain the verticalsync pulses with equalizing pulses).
l1[4:0] = 00000 no line selected for closed caption encoding
l1[4:0] = 000xx do not use these codes
...
l1[4:0] = i codeline (i+6) (SMPTE)selected for encoding
...
l1[4:0] = 11111line 37 (SMPTE)selected
- 625/50system: (625-CCIR/ITU-R line number convention)
Only lines 7 through 23 should be used for closed caption or extended data services.
l1[4:0] = 00000 no line selected for closed caption encoding
...
l1[4:0] = i codeline (i+6) (CCIR) selectedfor encoding (i > 0)
...
l1[4:0] = 11111line 37 (CCIR)selected
(*) Default value = 01111line 21 (525/60,525-SMPTEline number convention).
This value also correspondsto line 21 in 625/50 system,(625-CCIRline number convention).
39/42
Page 40
STV0118
VI- REGISTERS(continued)
VI.2- RegisterContents and Description(continued)
(*)= DEFAULTmode when NRESET pin is active(LOW level)
REGISTER_44 - cclif2 : Closed caption/extended data line insertion for field 2
TV line number where closed caption/extendeddata is to be encoded in field 2 is programmable through
the following register :
MSBLSB
register_44xxxxxxxxxxxxI2_4I2_3I2_2I2_1I2_0
Default00001111
- 525/60system : (525-SMPTEline number convention)
Only lines273 through284 shouldbe used forclosedcaption or extendeddata services(precedinglines
contain the verticalsync pulses with equalizing pulses), although it is possible to program over a wider
range.
l2[4:0] = 00000 no line selected for closed caption encoding
l2[4:0] = 000xx do not use these codes
l2[4:0] = i line(269 +i) (SMPTE) selected for encoding
...
l2[4:0] = 01111line 284 (SMPTE) selectedforencoding
l2[4:0] = 11111line 300 (SMPTE)
Note : if cgms is allowed on lines 20 and 283 (525/60, 525-SMPTE line number convention), closed
captions shouldnot be programmedon theselines.
- 625/50system : (625-CCIRline number convention)
Only lines319 through336 shouldbe used forclosedcaption or extendeddata services(precedinglines
contain the verticalsync pulses with equalizing pulses), although it is possible to program over a wider
range.
l2[4:0] = 00000 no line selected for closed caption encoding (i > 0)
l2[4:0] = i line(318 +i) (CCIR) selected for encoding
...
l2[4:0] = 10010 line 336 (CCIR) selectedfor encoding
l2[4:0] = 11111line 349 (CCIR)
(*) Default value = 01111line 284 (525/60,525-SMPTE line number convention).
This value also correspondsto line 333 in 625/50system, (625-CCIRline numberconvention).
REGISTERS_45up to 63 :
40/42
Reserved
Page 41
VII - APPLICATION
Figure34 : TypicalApplication
STV0118
OUT
F
2.2kΩ820Ω
10µF
200Ω
VIDEO OUTPUT STAGE
F : Low Pass Filter
IN
DDA
V
10µF100nF
DDA
V
DDB
V
VR_RGB
17
9-BIT TRIDAC
20Ω75Ω
1.1kΩ
REF(RGB)
I
16
IC
(ST20)
TRANSPORT
SDA
SCL
100nF
4.7kΩ
DD
V
V
4.7kΩ
DD
22µF
75Ω
47kΩ
75Ω
75Ω
6.8nF
22kΩ
10µF
DD
V
DD
V
NRESET
21
27
25
SS
V
10
26
CKREF
24
TTXD
23
VIDEO OUTPUT STAGE
G/Y
TTXS/CSI2C
20
22
R/C
B/CVBS
18
19
VIDEO OUTPUT STAGE
VIDEO OUTPUT STAGE
TELETEXT
+
CFG
CTRL
REGISTER
SWITCH
TRAP
CKREF = 27MHz
&
SYNC
VIDEO
CONTROL
1
28
HSYNC
ODD/EVEN
TIMING
GENERATOR
2
Y/CR/CB7
AUTOTEST
3
Y/CR/CB6
PATTERN
COLOR BAR
4
Y/CR/CB5
5
Y/CR/CB4
MPEG DECODER
RGB
ENCODING
CB-CR
DEMULTIPLEXER
6
Y/CR/CB3
7
Y/CR/CB2
LUMA
PROCESSING
Y
8
9
Y/CR/CB1
Y/CR/CB0
CLOSED
CAPTIONS
11
CVBS
VIDEO OUTPUT STAGE
75Ω
CGMS
VR_CVBS
6.8nF
CHROMA
12
1.2kΩ
PROCESSOR
DAC
9-BIT
13
1415
SSA
V
REF(CVBS)
I
STV0118 (Master)
=5VV
= 3.3VV
= 3.3VV
DD
DDB
DDA
(0V)
SSA
=V
(0V)
SS
=V
0118-03.EPS
41/42
Page 42
STV0118
VIII - PACKAGE MECHANICALDATA
28 PINS - PLASTICMICROPACKAGE (SO)
Dimensions
Min.Typ.Max.Min.Typ.Max.
MillimetersInches
A2.650.104
a10.10.20.0040.0078
b0.350.490.0140.019
b10.230.320.0090.013
C0.50.020
c145
o
(Typ.)
D17.718.10.6970.713
E1010.650.3940.419
e1.270.050
e316.510.65
F7.47.60.2910.299
L0.41.270.0160.050
S8
Informationfurnished is believed to be accurateand reliable.However, SGS-THOMSONMicroelectronics assumesno responsibility
for the consequences of use of such information nor for any infringement of patentsor other rights of third parties which may result
from itsuse.No licence is grantedby implication orotherwise underany patent or patent rights of SGS-THOMSON Microelectronics.
Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all
informationpreviouslysupplied. SGS-THOMSON Microelectronics products arenotauthorized for use as criticalcomponents in life
support devices or systemswithout express written approval of SGS-THOMSON Microelectronics.
1997 SGS-THOMSON Microelectronics- All Rights Reserved
2
Purchase of I
2
I
C Patent. Rights to use these components in a I2C system,is granted provided that the system conforms to
Australia - Brazil - Canada - China - France - Germany - Hong Kong - Italy - Japan - Korea - Malaysia - Malta- Morocco
The Netherlands - Singapore- Spain - Sweden- Switzerland - Taiwan - Thailand - United Kingdom - U.S.A.
C Components of SGS-THOMSON Microelectronics, conveys a license under the Philips
2
C Standard Specifications as defined by Philips.
the I
SGS-THOMSON Microelectronics GROUP OF COMPANIES
o
(Max.)
PM-SO28.EPS
SO28C.TBL
42/42
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.