
LM1247 Address Map (Continued)
TABLE 17. LM1247 Four-Color Attribute Registers
Register
Address
D7
D6
D5
D4
D3
D2
D1
D0
ATT4C0n
8500 + (n*8)
C0B[1:0]
C0G[2:0]
C0R[2:0]
ATT4C1n
+1
C1B[0]
C1G[2:0]
C1R[2:0]
C0B[2]
ATT4C2n
+2
X
EF[3:0]
C1B[2:1]
ATT4C3n
+3
XXXXXXX
X
ATT4C4n
+4
C2B[1:0]
C2G[2:0]
C2R[2:0]
ATT4C5n
+5
C3B[0]
C3G[2:0]
C3R[2:0]
C2B[2]
ATT4C6n
+6
XXXXXX
C3B[2:1]
ATT4C7n
+7
XXXXXXX
X
Building Display Pages
THE OSD WINDOW
The Display Page RAM contains all of the 8-bit display character codes and their associated 4-bit attribute codes, and the special
12-bit page control codes — the End-of-Line, skip-line parameters and End-of-Screen characters. The LM1247 has a distinct
advantage over many OSD Generators that it allows variable size and format windows. The window size is not dictated by a fixed
geometry area of RAM. Instead, 512 locations of 12-bit words are allocated in RAM for the definition of the windows, with special
control codes to define the window size and shape.
Window width can be any length supported by the number of pixels per line that is selected divided by the number of pixels in a
character line. It must be remembered that OSD characters displayed during the monitor blanking time will not be displayed on
the screen, so the practical limit to the number of horizontal characters on a line is reduced by the number of characters within
the horizontal blanking period.
The EOS code tells the OSD generator that the character codes following belong to another displayed window at the next window
location. A EOS code may follow normal characters or an SL code, but never an EOL control code, because EOL is always
followed by an AC plus an SL code.
WRITING TO THE PAGE RAM
The Display Page RAM can contain up to 512 of the above listed characters and control codes. Each character, or control code
will consume one of the possible 512 locations. For convenience, a single write instruction to bit 3 of the Frame Control Register
(0x8400) can reset the page RAM value to all zero. This should be done at power up to avoid unpredictable behaviour.
Display Window 1 will also start at the first location (corresponding to the I
2C address 0x8000). This location must always contain
the Skip-Line (SL) code associated with the first row of Display Window 1. The attribute for this SL code must be written before
the SL code itself, and will be stored in the lower four bits of this memory location. Subsequent locations should contain the
characters to be displayed on line 1 of Display Window 1, until the EOL code or EOS code is written into the Display Page-RAM.
The skip-line parameters associated with the next line must always be written to the location immediately after the preceding line’s
End-of-Line character. The only exception to this rule is when a End-of-Screen character (value 0x0000) is encountered. It is
important to note that an End-of-Line character should not precede an End-of-Screen character (otherwise the End-of-Screen
character will be interpreted as the next line’s skip-line code). Instead, the End-of-Screen code will end the line and also the
window, making it unnecessary to precede it with a EOL. The I
2C Format for writing a sequence of display characters is minimized
by allowing sequential characters with the same attribute code to send in a string as follows:
Byte #1: I
2C Slave Address
Byte #2: LSB Register Address
Byte #3: MSB Register Address
Byte #4: Attribute Table Entry to use for the following skip-line code or characters
Byte #5: First display character, SL parameter, EOL or EOS control code
Byte #6: Second display character, SL parameter, EOL or EOS control code
Byte #7: Third display character, SL parameter, EOL or EOS control code
Byte #n: Last display character in this color sequence, SL parameter, EOL or EOS control code to use the associated Attribute
Table Entry.
The Attribute Table Entry (Byte #4, of the above) is automatically associated with each subsequent display character or SL code
written. The following are examples of how the Display Page RAM associates to the actual On-Screen Display Window #1.
EXAMPLE 1
A 3x2 character matrix of gray characters on a black background is to be displayed on the screen, using 2-color character codes:
The actual On-Screen Display of Window #1 is shown in
Figure 25. Note the dotted white lines are not actually part of the OSD
image to be displayed. They are shown here only to designate character boundaries.
LM1247
www.national.com
27