
are written as 8-bit bytes, but are stored with their attributes in groups of 13 bits. When writing, one byte describes a displayed
character (CC), Attribute Code (AC), End-Of-Screen (EOS), End-Of-Line (EOL) or Skip Line (SL) code.
When reading characters from RAM, bit 1 of the Character Font Access Register (0x8402) determines whether the lower 8 bits or
upper 5 bits of the Page RAM are returned.
Table 5 gives the lower byte read, which is the first 8 character code bits when bit 1
of the Character Font Access Register is a 0.
Table 6 gives the upper byte read, which is the 9th character code bit and 4 attribute
code bits when this bit is set to a 1.
TABLE 5. Page RAM Lower Byte Read Data
Address Range
D7
D6
D5
D4
D3
D2
D1
D0
0x8000–0x81FF
CHAR_CODE[7:0]
TABLE 6. Page RAM Upper Byte Read Data
Address
D7
D6
D5
D4
D3
D2
D1
D0
0x8000–0x81FF
X
CC[8]
ATTR_CODE[3:0]
RAM Data Format
Each of the 512 locations in the page RAM is comprised of a 13-bit code consisting of an 9-bit character or control code, and a 4-
bit attribute code. Each of the characters is stored in sequence in the page RAM in bits 8:0. Special codes are used between lines
to show where one line ends and the next begins, and also to allow blank (or ‘skipped’) single scan lines to be added between
character lines.
Table 7 shows the format of a character stored in RAM. Note that even though this is a 13-bit format, reading and
writing characters and codes is done in 8-bit bytes.
TABLE 7. Page RAM Format (9-bit mode)
ATTRIBUTE CODE
CHARACTER CODE
ATT[3:0]
CC[8:0]
Bits 8-0 determined which of the 512 characters is to be called from the character ROM. Bits 12–9 address one of the 16 attributes
in the table containing the colors and enhanced features to be used for this particular character. Two separate attribute tables are
used, one for 2-color characters, and the other for 4-color characters. Note there are 16 available attributes for 2-color characters
and a different set of 16 available attributes for 4-color characters.
End-Of-Line Code
To signify the end of a line of characters, a special End-Of-Line (EOL) code is used in place of a character code. This code, shown
in
Table 8 tells the OSD generator that the character and attribute codes which follow must be placed on a new line in the displayed
window. Bits 8–1 are zeros, bit 0 is a one. The attribute that is stored in Page RAM along with this code is not used.
TABLE 8. End-Of-Line Code
ATTRIBUTE CODE
END-OF-LINE CODE
ATT[3:0]
0
1
Skip-Line Code
In order to allow finer control of the vertical spacing of character lines, each displayed line of characters may have up to 15 skipped
(i.e., blank) lines between it and the line beneath it. Each skipped line is treated as a single character pixel line, so multiple scan
lines may actually be displayed in order to maintain accurate size relative to the character cell. An internal algorithm maintains
vertical height proportionality (see the section on Constant Character Height Mechanism). To specify the number of skipped lines,
the first character in each new line of characters is interpreted differently than the others in the line. Its data are interpreted as
shown in
Table 9, with the attribute bits setting the color of the skipped lines.
TABLE 9. Skipped-Line Code
ATTRIBUTE CODE
NUMBER OF SKIPPED LINES
ATT[3:0]
X
SL[3:0]
Bits 8–4 are reserved and should be set to zero. Bits 3–0 determine how many blank pixel lines will be inserted between the present
line of display characters and the next. A range of 0–15 may be selected. Bits 12–9 determine which attribute the pixels in the
skipped lines will have, which is always called from the two-color attribute table. The pixels will have the background color (Color
0) of the selected attribute table entry.
25
www.national.com
200969 Version 2 Revision 4
Print Date/Time: 2011/07/11 11:20:12
LM1276