Epson Research and Development
Page 15
Vancouver Design Center
Programming Notes and Examples S1D13706
Issue Date: 01/02/23 X31B-G-003-03
3.3 Memory Organization for Two Bit-per-pixel (4 Colors/Gray Shades)
Figure 3-2: Pixel Storage for 2 Bpp in One Byte of Display Buffer
At a color depth of 2 bpp, each byte of display buffer contains four adjacent pixels. Setting
or resetting any pixel requires reading the entire byte, masking out the unchanged bits and
setting the appropriate bits to 1.
Two bit pixels provide 4 gray shades/color possibilities. For monochrome panels the gray
shades are generated by indexing into the first 4 elements of the green component of the
Look-Up Table (LUT). For color panels the 4 colors are derived by indexing into the first
4 positions of the LUT.
3.4 Memory Organization for Four Bit-per-pixel (16 Colors/Gray Shades)
Figure 3-3: Pixel Storage for 4 Bpp in One Byte of Display Buffer
At a color depth of 4 bpp, each byte of display buffer contains two adjacent pixels. Setting
or resetting any pixel requires reading the entire byte, masking out the upper or lower nibble
(4 bits) and setting the appropriate bits to 1.
Four bit pixels provide 16 gray shades/color possibilities. For monochrome panels the gray
shades are generated by indexing into the first 16 elements of the green component of the
Look-Up Table (LUT). For color panels the 16 colors are derived by indexing into the first
16 positions of the LUT.
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Pixel 0
Bits 1-0
Pixel 1
Bits 1-0
Pixel 2
Bits 1-0
Pixel 3
Bits 1-0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Pixel 0
Bits 3-0
Pixel 1
Bits 3-0