2.1.1Data to Write .........................................................................................................................................................9
2.1.3Format, Window and Row Address (FWR) .........................................................................................................10
2.1.4Format, Attribute and Column Address (FAC) ....................................................................................................10
2.1.5Control Data, Color Codes or Character Codes .................................................................................................11
2.1.6Configuration of Transmission Formats .............................................................................................................11
3.5Window Background Color ......... ................................................................................. .......17
3.6Window Bordering and Shadowing Effects ........................... ....................... .. ....................17
3.6.1Enable Bordering or Shadowing Effects .............................................................................................................17
3.6.2Bordering or Shadowing Selection .....................................................................................................................17
3.6.3Border or Shadow Color .....................................................................................................................................18
3.6.4Bordering or Shadowing Size .............................................................................................................................18
4.5.1Character Background Color ..............................................................................................................................22
4.5.2Character Color ...................................................................................................................................................23
7.2.1Data Sent Using I²C ............................................................................................................................................31
7.2.2Data Sent Using the RGB Channel ....................................................................................................................31
7.3Control Reg is te r s D e s cr ip tion ................ .. ............. .. .. .............. .. .. ........................... .. .. ........33
7.4Line and Pixel O ff s ets .......... .. ........................................ .. .. ........................... .. .. .................34
Power On Reset .................................................................................................................................................37
10.1.2Examples of Programming ..................................................................................................................................42
Hard reset at power-up (following a power-up) ...................................................................................................42
Change of position & size of 1 window (ex. window 3) without disable of window .............................................42
Re-allocation, reset, and writing new characters in windows ..............................................................................43
The STV9937 is an Advanced On Screen Dis pla y gener ator for CR T monit ors . It in cludes a speci fic
architecture allowing mul tiple menu displays, a built in 512 charact e r ROM and the Picture
BooST
The patented Picture BooST
screen area or even over the entir e screen.
TM
system.
TM
feature allows images to be boosted either within a window, a
Using traditional architecture (OSD + Preamp STV9212) and without any additional devices on the
TM
CRT board, Picture BooST
boosts the brightness and sharpness of the video on CRT displays
giving a TV like effect.
TM
The STV9937 can drive Picture BooST
either through the VGA cable (using RGB or DDC),
through the USB channel via the MCU or through the OSD menu (the registers can be accessed b y
the MCU via I²C).
TM
The STV9937 embeds the RGB data decoder, the Pic tur e BooST
Picture BooST
Along with the Picture BooST
TM
signal generator.
TM
and traditional OSD features, the STV9937 allows a simultaneous
Control Registers and the
display of up to four menus anywhere on the screen. Each of the four independent windows, all
displaying characters, can be overlapped and display priorities are automatically controlled.
● Window sizes and posit i ons are i ndependentl y prog r ammable as well as scrol ling men u ef fects.
● Programming of the general OSD and of the 4 windo ws is controll ed b y an I²C bus in Re ad and
Write modes, to suit the various CRT displays.
● Associated with an easily programmable character height, the internal PLL generates the
programmable pixel clock, without using a crystal oscillator, that defines the character width
making the device suitable for multi-sync applications.
● A maximum of 640 charac ters, defi ned in the mask-pr ogrammab le R OM, are distrib uted among
the 4 windows and displayed simultaneously.
Figure 1: Multi-window Concept with Character Display
5/49
Page 6
General DescriptionSTV9937
Figure 2: STV9937 Block Diagram
STV9937
HSYNC
TEST1
TEST2
VS
HFLY
SCL
SDA
STV9937
PB Sequencer
OSD Sequencer
I2C Interface
And Registers
Test
RPVCO
PLL
Reset Signals
OSD Pixel Clock
PB Pixel Clock
Reset
RINGIN
RGB Input Buffer
Picture BooST
Decoder and Generator
4 Windows
OSD
Generator
BIN
TM
PB
RAM
ROM
ROUT
ContrastContrast
TM
System Block Diagram
I2C
PreAmplifier: STV9212
OSD: STV9937
Figure 3: PictureBooST
Computer main Unit Monitor CRT board
4
2
P
I
D
S
PictureBooST™
Video Card
DDC
H Sync
V Sync
Picture booST™
Picture booST ™
Window ™ Software
Window ™ Software
I
D
Color code
R G B Boost OSD FBlk
4
2
P
PictureBooST ™
Decoder
Window
Coordinate
register
GOUTBOUTFBLK
Boost gain
& Sharpness
OSD
OSD
generator
generator
Line PLLLine PLL
Video Amplifier AC or DC
DriveDrive
H Fly
H Sync
6/49
Page 7
STV9937General Description
1.1Pin Description
Figure 4: Pin Connections
AVSS
RP
VCO
AVDD
TEST1
TEST2
HFLY
VS
HSYNC
SDA
SCL
1
2
3
4
5
6
7
8
9
10
11
12
24
23
22
21
20
19
18
17
16
15
14
13
IVSS
BIN
GIN
RIN
IVDD
DVDD
DVSS
PB
BOUT
GOUT
ROUT
FBLK
Table 1: Pin Descriptions
N°Pin NameDirectionDigital/AnalogFunction
1AVSS-SupplyAnalog Ground
2RPI/OAnalogfor VCO
3VCOI/OAnalogfor VCO
4AVDD-SupplyAnalog Power Supply
5TEST1InputDigitalRemains at 0 (for test purposes only)
6TEST2InputDigitalRemains at 0 (for test purposes only)
7HFLYInputDigitalHorizontal Flyback Input
8VSInputDigitalVertical Synchronization Input
9HSYNCInputDigitalHor i zontal Synchronization Input
10SDAI/ODigitalSerial Data of I²C bus
11SCLInputDigitalSerial Clock of I²C bus
11DVDD-SupplyDigital Power Supply
12N/C--13FBLKOutputDigit alFast Blanking Output
14ROUTOutputDigitalOSD Red Color Output
15GOUTOutputDigitalOSD Green Color Output
16BOUTOutputDigitalOSD Blue Color Output
17PBOutputDigital
18DVSS-SupplyDigital Ground
PictureBooST
7/49
TM
Output
Page 8
General DescriptionSTV9937
Table 1: Pin Descriptions (Continued)
N°Pin NameDirectionDigital/AnalogFunction
19DVDD-SupplyDigital Power Supply
20IVDD-SupplyPower Supply for Video Input
21RINInputAnalogVGA Signal Input, Red Channel
22GINInputAnalogVGA Signal Input, Green Channel
23BINInputAnalogVGA Signal Input, Blue Channel
24IVSS-SupplyGround for Video Input
8/49
Page 9
STV9937Register Addressing
2Register Addressing
All OSD control registers are located in Wi ndow 0, Row 0. PictureBooSTTM control registers are
located in Window 0, Row 1. All color-boxes data are located in Window 0, Row 2.
Three formats are available: A, B and C, as described in the I²C protocol (see Section 2.1: I²C
Protocol).
All addresses (FAC and FWR bytes) are based on Formats A or B, and are written in hexadecimal
format.
2.1I²C Protocol
The serial interface with t he microcontrolleris an I²C bus with 2 wires: SCL and SD A. The OSD is a
slav e circuit with 2 modes: Write and Read. The sla v e address of the OSD is BAh in write mode and
BBh in read mode.
2.1.1Data to Write
In the OSD, the I²C bus is used to write - read:
● the contro l data
● the character codes and their respective color codes
● the color-boxes (8 color-boxes per window).
A color-box contains the character color, character background color and blink data. There are 8
color-boxes for each OSD window which are used to define the colors available for all the
characters of the given OSD window. 3 bits are required to code the 8 color-boxes. These bits are
the color code.
For more information, refer to Section 4.5: Character Colors on page 22.
Each character code is related to its own window, row and column. Consequently, the protocol of
the I²C transmission inclu des this information (window, ro w and column) to define the position of t he
character on the screen. These 3 piec es of information about the position are tr ansmitted in 2 b ytes .
As each character on the screen has its own color code, the same protocol is used to write all the
color codes and character codes. Only the attribute bit called ‘A’ allows the character codes to be
distinguished from the color co des corresponding to one position on the screen.
The control data is also written with the same protocol using windows, rows and columns. Window
0 is reserved for control data and color codes.
2.1.2Transmission Formats
There are 3 transmission formats to suit the amount of data to update. The transmission format is
coded in the “window/row/column” bytes.
Format A is suitab le for updating small amounts of data whi ch are allocated to different windo w, row
and column addresses.
Format B is recommended for updating data for the same window and the same row address, but
with a different column address and when changing the Character/Color-box attribute (bit A), or
when writing to a different I²C control register.
Format C is appropriate for updating large amounts of data from a full window or full screen. The
window, row and column addresses are incremented automatically when this format is applied.
Data is written to fill all the allocation memory of the windows .
9/49
Page 10
Register AddressingSTV9937
The transmission formats are as follows:
1. Format A: S-FWR-FAC-D
® FWR-FAC-D ® FWR-FAC-D ® FWR-FAC-D...Stop
2. Format B: S-FWR-FAC-D
3. Format C: S-FWR-FAC-D
® FAC-D ® FAC-D ® FAC-D...Stop
® D ® D ®D...Stop
Where:
S = Slave address = BAh
FWR = Format, Window and Row address
FAC = Format, Attribute and Column address
D = CTRL Control data (8 bits), CB Color codes (3 bits) or RC Character codes (9 bits).
In Format C, t he order of automati c incrementat ion for data D i s first t he column v alue , then t he ro w
value, and then the window value.
Table 2: Various Bytes coded in the I²C Transmission
ByteBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
FWR
FAC
D: Control Data (in window 0 only)CTRL[7:0]
D: Color Code and Character Code MSB000RC[8]0CB[2:0]
D: Character Code LSBsRC[7:0]
1
0
W[2:0]R[3:0]
FAC[4:0]
2.1.3Format, Window and Row Address (FWR)
Bit 7 indicates the ‘Window & Row’ byte when set to 1.
W[2:0]: Window Number
000: Control Data and Color Codes
001: Window 1
010: Window 2
011: Window 3
100: Window 4
R[3:0]: Row Numbers from 0 to 15. Each window has a maximum number of 16 rows.
2.1.4Format, Attribute and Column Address (FAC)
Bit 7 indicates the ‘Attrib ute & Column’ byte when set to 0.
F: Format
0: Format A or B
1: Format C
A: Transmission of character code or color code
0: Character Code
1: Color Code and Character Code MSB
When reading or writing control data and/or character codes, bit A must be set to 0. For color code
and character code MSB, bit A must be set to 1.
10/49
Page 11
STV9937Register Addressing
C[4:0]: Column Number
There are 32 possible columns .
00000: 1 column
11111: 32 columns
2.1.5Control Data, Color Codes or Character Codes
Color codes are stored on 3 bits. Control data is stored on 8 bits and Charact er codes are stored on
9 bits.
The F bit from the FAC byte is alwa ys 0 in this case.
11/49
Page 12
Register AddressingSTV9937
To change from Format B to Format C
S - FWR[0]- FAC[0]- D[0] ® FAC[1]- D[1] ® FAC[2]- D[2] ® D[3] ® D[4]...
The “F” bit from the FAC byte is as follows: F[0] = F[1] = “0” and F[2] = “1”
It is not possible to change from Format C back to Format A or B.
Figure 5: Format Changing Sequences
Start
start
2.3Read Mode
The transmission format is shown as below:
Start - S(w) - FWR- FAC - Stop - Start - S(r) - D
Where:
S(r) = Slave address in read mode = BBh = 10111011.
Registers and data in RAM are readable.
This mode is useful when developing OSD applications.
2.4Addressing Map
Format A
Format C
Format B
® D ® D ® D...Stop
Table 4: Window Addressing Map
WindowRowColumnData
Window 0Row 0Columns 0 to 31Control Data (8 bits)
Window 0Row 1Columns 0 to 31
Window 0Row 2Columns 0 to 31Color-boxes (8 bits)
Windows 1, 2, 3 and 4Rows 0 to n (n = 15 max.)Columns 0 to m (m = 31 max.)Characters Coding (12 bits)
12/49
PictureBooST
TM
Data
Page 13
STV9937Window Specifications
3Window Specifications
Four different independent windows with separate character displays can be simultaneously
display ed on screen . It is pos sib le to ha v e o v erlapping windo ws with an automat ic control of display
priorities: downscale priorities from Window 4 to Window 1.
Window 1 is well-ad apted for the OSD general menu.
The 4 windows, each with its own character display, can be positioned anywhere on the screen.
The following characteristics are defined for each window:
● Enable Display
● Position
● Size, adjustable with memory allocation
● Background Color
● Bordering or Shadowing effects with programmable color, height and width.
Figure 6: Example of Window Displays
Axis
Origin
Screen
HD
Window 2
VD
Window 1
Window 3
Window 4
13/49
Page 14
Window SpecificationsSTV9937
3.1Enable Display
The Enable Display command for each window is selected by bits ENW1, ENW2, ENW3 and
ENW4. If the ENWi bit is set to 1, the corresponding window is displayed.
The 4 windows are arranged in a fr ame whose origin coordinates are t he horizontal dela y ( HD) and
the vertical delay (VD) loc ated at the upper left-hand corner of the monitor screen. When the HD
and VD values are changed, the 4 windows within the frame position are automatically shifted by
the same value. The origin (HD, VD) can be programmed anywhere on the screen. Adjusting the
origin position is used to globally reposition the OSD windows.
The advantages of this system are easi er programming, the possibility to adapt the position of all
windows at a single time without changing the relative position of each window and the possibility
for the user to program all 4 window positions.
3.2.1General Horizontal Delay (HD)
Table 6: Origin of Windows on Horizontal Axis: Horizontal Delay
The general horizontal delay defines the horizontal position of the origin coordinate f or all four OSD
windows. The horizontal delay is selected by bits HD[6:0].
General Horizontal Offset = 50 pixels
General Horizontal Delay = HD[6:0] x 6 pixels + General Offset (i n pixels)
The default value of the horiz ontal delay is 0h (left-hand side of the moni tor screen).
3.2.2Gen eral Vertical Delay (VD)
Table 7: Origin of Windows on Vertical Axis: Vertical Delay
The general vertical delay defines the vertical position of the origin coordinate for all four OSD
windows. The v ertical delay is selected by bits VD[7:0] . A general vertical offset of 2 scan lines is
also applied.
The range of the vertical delay is from 2 to 1022 scan lines, in steps of 4 scan lines each.
General Ver tical Delay = VD[7:0] x 4 + 2 (in scan lines)
The default value of the vertical delay is 0h (top of screen).
14/49
Page 15
STV9937Window Specifications
3.3Window Positions in the Frame
All values are referenced to the origin coordinates (HD, VD). For more information, refer to
Figure 6 on page 13.
3.3.1Window Horizontal Delay
The window horizontal delay defines the horizontal start position for each separate OSD window.
This value is selected by bits HDW1[6:0] , HDW2[6:0], HDW3[6:0] and HDW4[6:0], respectively.
The range of the window horizontal delay is from 0 to 1524 pixels, in steps of 12 pixels each.
Window Horizontal Delay = HDWi[6:0] x 12 pixels
The total horizontal delay of a window is:
General Horizontal Delay + HDWi[6:0] x 12 pixels; or,
HD[6:0] x 6 pixels + HDWi[6:0] x 12 pixels + (50 pixels).
The default values for the window horizontal delay for each of the four OSD windows is given in
Table 8.
3.3.2Window Vertical Delay
The window vertical delay defines the vertical start position for each separate OSD window. This
value is selected by bits VDW1[5:0], VDW2[ 5:0], VDW3[5: 0] and VDW4[5:0], respectively.
The range of the window v ertical delay i s from 0 to 63 rows of c haracters, in steps of 1 charact er row
each. It is important to note that the height of each character row is defined by the row height
parameter. For more information, refer to Section 4.4: Space Lines on page 21.
Window Vertical Delay = VDWi[5: 0] x Row_Height
The total vertical delay of a windo w is:
General Ver tical Delay + VDWi[5:0] x Row_Height (in scan lines); or,
(VD[7:0] x 4 + 2) + VDWi[5:0] x Row_Height (in scan lines).
The default values for the window vertical delay for each of the four OSD windows is given in
Table 9.
15/49
Page 16
Window SpecificationsSTV9937
3.4Window Size: Number of Character Rows and Character Columns
3.4.1Window Horizontal Size
The window horizontal size defines the number of characters displayed for character row for each
separate OSD window. This value is selected by bits HSW1[4:0], HSW2[4:0], HSW3[4:0] and
HSW4[4:0], respectively.
The range of the window horizontal size is from 1 to 32 characters, in steps of 1 character each.
Each character is 12 pixels long. There is an offset of 1 character.
Window Horizontal Size = HSWi[4:0] +1 characters
The default values for the window horizontal size for each of the four OSD windows is given in
Table 10.
3.4.2Window Vertical Size
The window vertical size defines the number of character rows d isplayed for each separate OSD
window. This value is selected by bits VSW1[3:0], VSW2[3:0], VSW3[3:0] and VSW4[3:0],
respectively.
The range of the window v e rtical size is from 1 to 16 char acter rows, in steps of 1 charac ter row
each. It is important to note that the height of each character row is defined by the row height
parameter . F or more information, refer t o Section 4.4: Space Lines on page 21. There is an offset of
1 character row.
Window Vert ical Size = (VSWi[3:0] + 1) x Row_Height (in scan lines)
Row_Height = Character_Height + 2 x Space_Lines
The default values for the window vertical size for each of th e four OSD windows is given in
Table 11.
Table 12 shows an example of the origin and size of windows based on the example shown in
Figure 8,
Table 12: Example of Origin and Size of Windows
Window iHDVDHSWiVSWi
Window 1
Window 2
16/49
0274
5045
Page 17
STV9937Window Specifications
Table 12: Example of Origin and Size of Windows
Window iHDVDHSWiVSWi
Window 3
Window 4
6463
3744
3.5Window Background Color
The window background color for each separate OSD window is coded over 4 bits as shown in
Table 13. The first bit (Ti) specifies whether the background is tr ansparent or if a color is displayed.
If the background is tr ansparent (Ti = 1), the active video is display ed as background.
If a color is displayed (Ti = 0), the background color for each separate OSD window is coded over
the last three bits (RWi, GWi and BWi, respectively). Windows are displayed with a white
background by default (7h).
The border or shadow c olor is s eparately progr ammable f or each separa te OSD window. This value
is selected by bits WSRi, WSGi and WSBi for each of the four OSD windows. The value for each
color is shown in Table 17.
The size of the bordering or shadowing width is separately programmable for each separate OSD
window. This value is selected by bits BSWWi[2:0] for each of the four OSD windows. The width
size is from 0 to 14 pixels, in steps of 2 pixels each.
Width Size = BSWWi[2:0] x 2 pixels
The size of the bordering or shadowing he ight is selected by bits BSHWi[3:0] for each of the four
windows. The height size is from 0 to 30 lines, in steps of 2 scan lines each.
Figure 7: Illustration of Window Bordering and Shadowing Effects
M pixels
Window Shadowing
N scan lines
N scan lines
Window Bordering
M pixels
3.7Window Display Priority Management
The OSD windows are displayed with the following priority: Window 4 (top), 3, 2 and 1 (bottom).
This order of priority is shown the e xample given in Figure 8.
Figure 8: Example of Window Displays
Screen
Axis
Origin
VD
HD
Window 2
Window 1
Window 3
Window 4
19/49
Page 20
Character Sp ecificationsSTV9937
4Character Specifications
4.1General Description
There are:
● 496 monochrome characters and 16 multi-color characters in ROM
● 32 to 127 characters per line
● character height varies between 18 and 127 scan lines
● 0 to 62 scan space lines between character rows, with the same number of lines above and
below the rows of characters.
With the possibility to select:
● blinking effect for each character
● shadowing effect for characters in each window
● background and foreg round character colors: for each character, among a Color-shop of 8
Color-boxes per window. There is a Color-shop for each window. The Color-boxes define the
background colors and the foreground character colors and blinking effect.
The horizontal resolution defines the number of pixels per line expressed in characters unit. This
value is selected by bits HR[6:0].
The range of the horizontal resolution is from 32 to 127 characters, i n steps of one character each.
The default value is 32 characters per line (20h). If bits HR[6:0] are prog rammed with a value less
than 32, the horizontal resoluti on wil l be 32 characters per line (minimum value).
HR[6:0] = Number of characters per line
It is important that the maximum pixel frequency must be respected (CLK2= 120 MHz maximum).
As each character is 12 pixels long, the number of pixels per line v aries from 384 to 1524. F or more
information, refer to Section 6: Pixel Clock Generator on page 29.
The vertical height defines the number of scan lines used to di splay the characters. This value is
selected by bits CH[6:0].
20/49
Page 21
STV9937Character Specifications
The range of the vertical height is from 18 to 127 lines.
CH[6:0] = Number of scan lines used to display the characters
The characters stored in ROM are coded on 18 lines. If bits CH[6:0] are programmed with a value
less than 18, the characters will be automatic ally displ a y ed with a height of 18 scan li nes (minim um
value).
When a multiple of 18 scan lines are dis pla y ed, all R OM lines are repeated N number of ti mes, with
N in the range of 1 to 7, so as not to exceed the displa y of 127 scan lines. For example, if CH[6:0] =
36, each ROM line is repeated twice.
If the number of scan lines displayed is not a multiple of 18, certain ROM lines are repeated more
often than others, as shown in Table 21. For example, if CH[6:0] = 40, each ROM line is repeated
twice and ROM lines 3, 7, 10 and 14 are repeated three times.
Table 21 shows which ROM lines, from 0 to 17, are repeated depending on the CH[6:0] value.
1. ‘R’ = Repeated ROM lines
‘A’ = Number of additional repeated lines
4.4Space Lines
The space lines define the number of scan li nes abo v e and belo w each char acter ro w. This value is
selected by bits RSPA[4:0]. The total row height is defined as follows:
Row_Height = Character_Height + 2 x Space_Lines (see Figure 9)
21/49
Page 22
Character Sp ecificationsSTV9937
The range of spacing lines is from 0 to 31 scan lines, in st eps of one scan line each. The default
value is 0 scan lines.
The space lines are displayed in the color of the associated character background.
The colors for the charact ers, c haracter bac kground and b lin king effect is separately pr ogrammab le
for each OSD window . The color v alues are stored i n a color-shop of 8 color-bo x es for each windo w .
There are 4 color-shops, 1 per window, offering the user 32 possibilities of character coloring.
As the color-boxes are in RAM, the user must write to the color-box prior to using it.
Color-box data i s stored in Windo w 0, Row 2. F or more information, refer to Sect ion 2.4: Addressing
A character background color can be separately progr ammed for each of the color-boxes. This
value is selecte d by bits BC, BR, BG and BB.
For more information concerning the window background color, refer to Section 3.5: Window
Background Color.
Bit BC is used to define if a specific char acter bac kg roun d color will be displayed or if the character
background color is the color of the window background.
22/49
Page 23
STV9937Character Specifications
If a specific character background color is selected for a colo r-box, the character background color
is selected by bits BR, BG and BB .
Table 24: Character Background Color
ColorBCBRBGBB
Black1000
Blue1001
Green1010
Cyan1011
Red1100
Magenta1101
Yellow1110
White1111
Window Backg rou nd Color
1. See Table 25
.
BCTIBackground Color
1XCharacter Background Color (BR, BG and BB)
00Window Background Color (RGBWi)
01Transparent Background (Video active)
4.5.2Character Color
A character color can be separat ely pr ogrammed f or each of t he color -bo x e s. This v alu e is select ed
by bits FR, FG and FB.
1
0
Table 25: Background Color Priority
T able 26: Character Colors
ColorFRFGFB
Black000
Blue001
Green010
Cyan011
Red100
Magenta101
Yellow110
White111
23/49
Page 24
Character Sp ecificationsSTV9937
4.5.3Character Blinking Effect
A character blin king eff ect can be separ ately pr ogrammed fo r each of the color-b o x es . This v alue is
selected by the BLINK bit. When this bit is set to 1, t he b linking effect is enab led and the charact ers
blink.
4.6Character Shadowing
A character shadowi ng effect can be s eparately prog rammed for each of the color- box es. This v alue
is selected by bits CSHA[3:0], respective ly. The shadowing color is black.
When this bit is set to 1, the characters of the corr esponding OSD window are displayed with a
shadowing effect, as shown in Figure 10. The default value is 0 (no shadowing effect).
The 4 OSD windows can be distributed differently. But the displayable windows will always contain
a total of 20 blocks ( 1 block consists of 32 characters).
Figure 12: Window Memory Space
1 Block
10 Blocks
4 Blocks
3 Blocks
3 Blocks
Window 0
Color-boxes
Window 1
Window 2
Window 3
Window 4
Displayable
Windows
5.3Memory Size Allocation
The total number of char acters or spac es is up to 640 with a maximum wi ndow si ze of 16 r ows of 32
characters.
The character codes of each windo w are allo cated to a specific memory space. This memory space
is programmable for each window. The window size must be less than or equal to its memory
allocation. Any windo w size can be modified within its specific memory space, the other windows
are not affected by this operation.
26/49
Page 27
STV9937RAM Specification
The user must reserve a memory space for the largest window . According to the e xample shown in
Figure 6, the total number of characters/spaces are:
Table 29: Window Sizes
WindowSize
Window 1
Window 2
Window 3
Window 4
Total
For e xampl e , t o c hange the si ze of Windo w 3 f rom 3 r o ws of 6 c harac ter s to 5 r ows of 4 c harac ters ,
the resulting size is 20 char acters . The n umber of r ows increa ses and the n umber of charac ters pe r
row decreases. The required memory is at least 20 characters.
Note:A space is considered as being a character.
The memory allocation is made by blocks of 32 char acters.
The maximum size of a windo w is 16 rows of 32 character s , or 512 chara cters . This cor responds to
16 blocks of 32 characters.
1 block is reserved for the color-boxes (see Chapter 4: Character Specifications on page 20),
leaving 20 blocks of 32 characters for character codes (640 characters maximum).
The RAM allocation for each window is coded in bits ALWi[3:0]. Window 4 memory allocati on uses
The number of memory blocks allocated for window “i” is (ALWi +1), the range of allocation is 1 to
16 blocks of 32 characters. The total number of blocks is 20.
Note:If the user changes only 1 window allocati on, the RAM a ddresses of t he follo wing wi ndows change.
Consequently we advise you to write the allocation when the windows are not displayed to avoid
false images.
27/49
Page 28
RAM SpecificationSTV9937
The default window RAM allocations are listed in Table 31.
Window 1: 10 blocks of 32 words = 320 characters (ALW1 = 9).
Window 2: 4 blocks of 32 words = 128 characters (ALW2 = 3).
Window 3: 3 blocks of 32 words = 96 characters (ALW3 = 2).
Window 4: the remaining RAM (3 blocks = 96 characters).
5.4Window Reset
All the RAM data from one of the four OSD windows can be reset by writing to bits RESETW[3:0].
When the RESETW bit is set to 1, all the RAM data in the allocation memory space of the
corresponding OSD window is reset. These bi ts are automaticall y cleared when the RAM allocatio n
reset is finished.
The Pixel Clock Generator is used to synchronize the display clock with the horizontal
synchronisation (Hsync) signal. This generator is based on a PLL function used to perform correct
jitter . The pix el fr equency is defined wit h the horizontal line frequ ency and the horizontal resolut ion.
Pixel Frequency (F
PIXEL2
) = 12 x HR[6:0] x f
HLINE
The VCO[1:0] value is used to select the appropriate curve partition of the VCO.
● a pixel clock for the OSD from 7.68 MHz to 120 MHz: F
● a pixel clock for the PictureBooST
TM
The PictureBooST
pixel clock provides the resolution of the PB pixel.It is locked on the HSYNC
TM
(PB) from 30 to 60 MHz: F
PIXEL2
PIXEL1
.
signal and the referenced edge is programmed using the HSP bit.
When the monitor resolution is changing, the micro cont roller changes the OSD horizontal
resolution to adapt the width of the OSD window. In this case, the frequency of the PB clock is
changing also. So the width and the position and the resolution of the PB windo w is changi ng.
29/49
Page 30
Picture BooSTTMSTV9937
7Picture BooST
TM
Picture BooSTTM allows images to be boosted either within a windo w, a screen area or over the
entire screen. To perform this function, the STV9212 preamplifier is required as well as the Picture
BooST
TM
software which sends the window or sc reen area coordina tes (X1, X2,Y1,Y2) to the RGB
video channels.
TM
The Picture BooST
● The RGB Comparator
● The Coordinate Decoder
● The Control and Data registers
system embedded in the STV9937 includes:
The STV9937 computes the data received on the RGB channel and generates a BooST signal
which is then sent to the STV9212. The coordinates can be received through the I²C bus by the
MCU as well.
The STV9937 also includes three 8 bits register used to store data received by RGB.
7.1Video RGB Input Stage
The input stage is a triple analog-digital buffer for the video RGB inputs.
● The input voltage range is 0 to 0.7 V
● The inputs have to be supplied through a serial capacitor (100nF)
● The input RGB must be set to ‘0’ during the horizontal sync .
The input stage includes a clamping function using the Hsync signal to fix the DC level of inputs.
Figure 13: Hsync Clamping Function
THTCL
100nF
HSYNC
AND
ENCL
CLP
The input stage is configured by thr ee control bits; THCTL, CLP and ENCL as shown in Figure 37.
30/49
Page 31
STV9937Picture BooSTTM
7.2PictureBooSTTM RGB Decoder
The STV9937 can receive the coordinates of the area to BooST through the RGB channel or
through I²C bus.
TM
The Picture BooST
area coordinates are coded as follows:
Table 35: PictureBooSTTM Window Coordinates
BitsDescription
X1[12:0]
X2[12:0]Right coordinate of the window, in CLK1 pixels
Y1[10:0]Top coordinate of the window, in lines
Y2[10:0]Bottom coordinate of the window, in lines
Left coordinate of the window, in CLK1 pixels (F
7.2.1Data Sent Using I²C
Before sending data to the corresponding registers, the PBVM bit must be set to 1. Then the
coordinates can be sent to the corresponding address, see Table 36:
● Row 1, Col 3 to 6 for X1, X2 coordinates
● Row 1, Col 7 to 10 for the Y1, Y2 coordinates.
7.2.2Data Sent Using the RGB Channel
The Picture BooST
● The Red channel contains the X1, X2 and Y1, Y2 coordinates information
● The Green Channel contains a specific activation code
● The Blue Channel contains the clock signal.
The Decoder stores the coordinates values to the corresponding address:
TM
Software sends coordinate data through the RGB channel:
PIXEL1
)
● Row 1, Col 3 to 6 for X1, X2 coordinates
● Row 1, Col 7 to 10 for the Y1, Y2 coordinates.
X1 and X2 are referred to the HSYNC signal, the resolution is F
(from 30 Mhz to 60 Mhz)
PIXEL1
31/49
Page 32
Picture BooSTTMSTV9937
In the same way, 3 other 8 bits of register data(D3A, D3B and D3C)can be sent via the video RGB
and detected by the STV9937. These three register s can be read by the I²C b us at Row1, Col 11 to
The HFLYP bit configures the polarity of the HFLY signal
HFLYP
OSDREF
0: Falling edge active (default value)
1: Rising edge active
The OSDREF selects the signal taken as reference
0: HFLY is the reference (default value)
1: HSYNC is the reference
The ENPB bit selects Picture BooST
ENPB
PBON
PBVM
0: The RGB video inputs are not decoded, there is no possibility of displaying the PB.
The user can write X1/X2 Y1/Y2 coordinates in the registers, but the On/Off bit is
inactive (default value)
1: PB decoding is active and the PB display can be made active with the PBON bit
The PBON bit selects Picture BooST
0: PB is not displayed (default value)
1: PB is displayed on the screen with the coordinates written in the X/Y registers
The PBVM bit selects the Picture BooST
0: Interface via RGB (default value)
1: Interface via I²C
7.4Line and Pixel Offsets
Due to the intrinsic del ay on the RGB channel during the RGB decodi ng, 2 offsets can be applied for
fine tuning as shown in below:
BitsDescription
OFFSETLIN[1:0]The line offset in SIGNED radix is coded on 2 bits from -2 to +1. Default value is 0.
OFFSETPIX[5:0]The pixel offset in SIGNED radix is coded on 6 bits from -32 to +31. Default value is 0.
TM
decoding
TM
display
TM
interface
Note:It is recommended to adjust the pixel offset each time the monitor resolution changes.
7.5PLL Synchronised
The STV9937 PLL can either be synchronized on the HFLY or HSYNC signals.
WARNING:Once synchronized on HFLY, the Picture BooST
BitDescription
HMUX
34/49
0: HSYNC is the synchronization signal
1: HFLY is the synchronization signal
TM
feature cannot be guaranteed.
Page 35
STV9937General OSD Programming
8General OSD Programming
8.1Enable OSD
The OSD window displays are enabled by the ENOSD bit.
ENOSD = 1: OSD window displays are active.
ENOSD = 0: OSD window displays are inactive. Pin FBLK = 0 and pins ROUT, GOUT and
BOUT pins = 0 (bit RGBPOL is 0). The default value is 0.
Table 38: Enable OSD
FWRFACBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
80h00hENOSD
8.2Fade-in and Fade-out Effect
The Fade-i n and Fade-out effect is used to progressively increase/decrease the OSD window to/
from its full size. This effect is enabled by the FADE bit.
FADE = 1: Fade effect is active
FADE = 0: Fade effect is inactive (default value)
Table 39: Fade
FWRFACBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
80h00hFADE
8.3Full Screen Display
The STV9937 allows a full screen display with a selectable color programmable by the FBK bit as
follows:
FBK = 1: The video area is repl aced by the color coded i n bits FSR, FSG and FSB (full screen
color values). Pin FBLK is always 1.
FBK = 0: Normal video mode whether or not the OSD menu is displayed. The default value of
bit FBK is 0.
When OSD display, FBLK = 1
When active video, FBLK = 0
When OSD display, FBLK = 0
When active video, FBLK = 1
Table 45: FBLK Output Control
Default Value
FBLK Inverted
Power On Reset
The digital core and the PLL are asynchronously reset at Power On.
Soft Reset
A soft reset is enabled by the RST bit.
TM
RST = 1: The digital core is reset. All control registers including PictureBooST
but with the
exception of PLL registers, are reset at the same value as at power on reset.
It is not necessary to write RST = 0 to stop the reset. This bit is automatically cleared.
PLL Register Reset
The Pixel Clock Generator (VCO[1:0]) and Horizontal Resolution (HR[6:0]) bits are reset by the
RST_PLL bit.
RST_PLL = 1: HR[6:0] and VCO[1:0] are reset to the same value as the power-on reset.
It is not necessary to write RST_PLL = 0 to stop the reset. This bit is automatically cleared.
Table 46: Reset
FWRFACBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
80h06hRST_PLLRST
37/49
Page 38
RegistersSTV9937
9Registers
9.1Register Specification
Control registers are located at address in Window 0, Row 0 and Row 1.
Color-boxes are located at addresses in Window 0, Row 2. See Section 4.5 on page 22.
Character codes are located at addresses in Windows 1 to 4, as described in Section 5.1 on
1. Write a new allocation just befor e the RAM re set.
2. Write a new allocation at any time but take care of the window display.
3. When resetting the RAM and writing in it just after , write in the RAM respecting the same order
as the reset: from the first to the last reset window, from the first window address (r o w 0, col 0)
to the last, incrementing columns, then row s, then windows.
4. Define the window horizontal size prior to writing character and color codes in RAM.
HSWI is used to compute the RAM address.
10.1.2 Examples of Programming
It is recommended to program the STV9937 in the following sequence:
● Via RGB Video mode
➺set ENPB =1
➺send data via RGB Video: Y then X coordinates.
● Via I2C mode
➺set ENPB =1, PBVM=1, PBON =0
➺send data via I2C: X and Y coordinates.
➺set PBON =1
● Changing the mode
➺set PBON = 0
➺change PBVM bit
➺write new coordinates, then the PBON can be set to 1.
Hard reset at power-up (following a power-up)
1. Write Window 0 registers to set the OSD parameters: write
➺VCO[1:0], horizontal resolution and vertical height of characters,
➺the position of reference,
➺the allocations if they are incorrect
(by default: 320 charac ters for window 1, 128 characters for each of the other s windows)
➺the windows position and size,
➺the color-boxes that will be used.
2. Write the character codes for each window to display.
3. Write the color-box data for each window to display.
4. Write the enable of windows: ENWi = 1 then ENOSD=1.
Change of position & size of 1 window (ex. window 3) without disable of window
1. Write new position and sizes.
2. Write new characters in the RAM.
42/49
Page 43
STV9937Application Hints
Re-allocation, reset, and writing new characters in windows
1. Disable windows.
2. Write new allocations .
3. Reset the windows.
4. Write new positions and sizes in control registers.
5. Write new color-boxes.
6. Write new characters and color-box data.
7. Enable windows.
10.2Hardware Hints
● The serial resistors on the ROUT, GOUT, BOUT, FBLK and PB outputs must be as close as
possible to the device.
● Both decoupling capacitors (100 nF and 100 µF) must be as close as possible to the analog
(pin 13) and digital (pin5) pow er supplies (see Figure 15).
● PLL network must be close to the devi ce but far from the ROUT, GOUT, BOUT, FBLK and PB
outputs. PLL network and ROUT, GOUT, BOUT and FBLK outputs should be separated by the
AVDD 3.3 V power trace.
● PLL ground (AGND) should not be connected either to DVSS or to other grounds of the
videoboard, as the ground is already connect ed int e rnally.
● It is better to supply the STV9937 device through ferrite beads (as an example the ferrite bead
could be 742 760 5 type from Würth Electronik) instead of traditional inductance that could
damage the OSD jitter with some parasitic resonance.
43/49
Page 44
Application DiagramsSTV9937
11Application Diagrams
Figure 15: STV9937 Application Diagram
R35 9K1
U3
3.3V
FB1BEAD_COIL
R3 3M3
C30 560pF
C1 47pF
100nF
R38 68K
C35
100uF/25V
1
2
3
4
5
6
AVSS
RP
VCO
AVDD
TEST 1
TEST 2
IVSS
BIN
GIN
RIN
IVDD
DVDD
24
23
22
21
20
19
C32 100nF
C33 100nF
C38 100nFC34
C36
100nF
FB2
BEAD_COIL
C37
100uF/25V
From v ideo connector
3.3V
BLK/Hfly
VS
HS
SDA
SCL
R37 100R
R39 100R
R32 100R
R34 100R
7
8
9
10
11
12
HFLY
VS
HSYNC
SDA
SCL
nc
STV9937
DVSS
PB
BOUT
GOUT
ROUT
FBLK
18
17
16
15
14
13
R40 330R
R42 330R
R43 330R
R46 330R
R41 330R
To the pre-amplifier
44/49
Page 45
STV9937Electrical and Timing Characteristics
12Electrical and Timing Characte r is tics
12.1Absolute Maximum Ratings
Symbol Parameter Value Unit
AVDD, IVDD, DVDD, OV
V
IN
T
OPER
T
STG
DC Supply Voltage-0.5, +4.0V
DD
Input Voltage for SCL, SDA, VS, HFLY and HSYNC-0.5, 5.5V
Ambient Operating Temperature0, +70
Storage Temperature-40, +125
12.2Operating Conditions
Symbol Parameter Min.Typ. Max. Unit
VDD
T
OPER
DC Supply Voltage AV
Ambient Operating Temperature02570
, IVDD, DVDD, OV
DD
DD.
3.03.33.6V
12.3Electrical and Timing Characteristics
(V
= 3.3V, VSS = 0V, TA = 0 to 70o, unless otherwise specified)
DD
Symbol Parameter Min.Typ. Max. Unit
o
C
o
C
o
C
Electrical Characteris tics
IDD
Analog and Digital Supply Current AIDD+ DIDD + OI
DD
50mA
Input Low Voltage (SCL, SDA, VS, HFLY, HSYNC, TEST1 and TEST2 pins)0.8V
V
IL
RIN, GIN, BIN (Video Input Voltage Amplitude)
Input High Voltage (SCL, SDA, VS, HFLY and HSYNC pins)
V
IH
Test inputs are connected to ground
RIN, GIN, BIN (Video Input Voltage Amplitude)
ROUT, GOUT, BOUT, FBLK and PB Output Low Voltage (IOL = 3 mA)
V
OL
SDA Open Drain Output Low Voltage (I
OL
ROUT, GOUT, BOUT, FBLK and PB Output High Voltage (IOH = 3 mA)
V
OH
SDA Open Drain Output High Voltage,
pulled up by external 3V to 5V power supply
1
1
= 4 mA)
050mV
2.05.0V
0.50.71.0V
0.4V
0.4V
2.4-V
5.0V
Timing Characteristics
Freq (Hline) Horizontal Synchronization Inpu t Range150kHz
t
r
t
f
ROUT, GOUT, BOUT, FBLK and PB Output rise time (C
ROUT, GOUT, BOUT, FBLK and PB Output fall time (C
LOAD
LOAD
= 15 pF)
= 15 pF)
2ns
2ns
1. For PictureBoost data transmission only
45/49
Page 46
Electrical and Timing CharacteristicsSTV9937
12.4I²C Bus Characteristics
T able 51: Characteristics of the SDA an SCL bus lines for F/S-mode I²C-bus devices
Standard mode Fast mode
Symbol Parameter
Min.Max.Min.Max.
I²C Interface: SDA and SCL
Unit
t
SP
f
SCL
t
HD;STA
t
LOW
t
HIGH
t
SU; tSTA
t
HD;DAT
t
SU;DAT
t
r
t
f
t
SU; tSTO
t
BUF
C
b
Pulse width of spikes which must be suppressed
by the input filter
n/an/a050ns
SCL clock frequency0 1000400kHz
Hold time (repeated) START Condition. After this
period, the first clock pulse is generated
4.00.6µs
LOW period of the SCL clock4.71.3µs
HIGH period of the SCL clock4.00.6µs
Set-up time for a repeated START condition4.70.6µs
Data hold time03.4500.9µs
Data set-up time250100ns
Rise time of both SCL and SDA signals1000
Fall time of both SCL and SDA signals300
20 + 0.1C
20 + 0.1C
b
b
300ns
300ns
Set-up time for STOP condition4.00.6µs
Bus free time between a STOP and a START
22 May 20030.2General modifications, corrections and updates.
26 June 20030.3Removal of draft status.
08 July 20030.4Update to Figure 3: PictureBooSTTM System Block Diagram on page 6.
24 September 20030.5
20 January 20040.5PLL synchronization information added.
Updated Section 10.2:Hardware Hints on page 43 and Figure 15: STV9937 Application
Diagram on page 44.
48/49
Page 49
STV9937
Information furnished is believed to be accura te and reliable. H owever, STMicroelec tronics assu mes no responsibi lity for the
consequences of us e o f s uc h i nfo rma tio n nor for any infringe me nt of p ate nts o r other rights of third part ies w h ich m ay re sul t
from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics.
Specifications men tio ned in this publication ar e s ubj ec t to ch ang e w it hou t no tic e. T his pu blication supersedes an d re pla ce s
all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life
support devices or systems without express written approval of STMicroelectronics.
The ST logo is a registered trademark of STMicroelectronics
All other names are the property of their respective owners