Graphics Accelerator
EP93xx User's Guide
SPEL = [X2% 2 (pixel depth / 8-bit byte)] x 8 = [101% 2 (16-bits / 8-bits)] x 8-bits =
[101% 2] x 8 = 1 x 8 = 8 = 0x8, and
8
EPEL = [X1% 2 (pixel depth / 8-bit byte)] x 8 = [20% 2 (16-bits / 8-bits)] x 8-bits = [20%
2] x 8 = 0 x 0 = 0 = 0x0
5. Write the word-aligned value of the SDRAM address 'for the beginning of the line draw'
to the
6. Write the desired background color value to the BG field in the
register. The 'off' pattern bits of the line will be displayed using the background color.
7. Write the desired foreground color value to the MASK field in the
register. The 'on' pattern bits of the line will be displayed using the foreground color.
8. Write YINC = 0xFFF and XINC = 0x49C to the
YINC = 4095 = 0xFFF
XINC = [abs(X2 - X1) / abs(Y2 - Y1)] x 4095 = [abs(20 - 101) / abs(20-301)] x 4095 =
(81 / 281) x 4095 = 1180.409, which rounds to 1180 = 0x49C
9. Write WIDTH = 0x50 to the "BLKDESTWIDTH":register, where
WIDTH = abs(X2 - X1)% 4096 - 1 = abs(20 - 101)% 4096 - 1 = 81% 4096 - 1 = 81 - 1 =
80 = 0x50
10. Write HEIGHT = 0x0 to the
HEIGHT = [abs(Y2 - Y1) - 1] / 4096 = [abs(20 - 301) - 1]/ 4096 = (281 - 1) / 4096 =
0.0686 = 0x0
11. Clear the
12.Write Line = '1', DXDIR = '0', DYDIR = '0', BG = '0', P = 0x4, and INTEN = '1' to the
"BLOCKCTRL"
13.Write EN = '1' to the
14.Wait for an interrupt or poll for EN = '0' in the
becomes cleared to '0', the Breshenham's Algorithm line draw function is complete.
8.6.3 Block Fill Function
The following sequence describes how to carry out a Block Fill function:
1. Setup BLOCKMASK Register
Write the desired pixel-fill value to the MASK field in the
pixel-fill value is dependant on the color depth.
2. Setup DESTPIXELSTRT Register
Write the desired values to the SPEL field and the EPEL field in the
register.
8-16
"BLKDESTSTRT"
register.
"BLKDESTHEIGHT"
"BLOCKCTRL"
register by writing 0x0000_0000 to it
register
"BLOCKCTRL"
Copyright 2007 Cirrus Logic
"LINEINC"
register, where
register, where
register
"BLOCKCTRL"
"BLOCKMASK"
"BACKGROUND"
"BLOCKMASK"
register. When the EN bit
register. The
"DESTPIXELSTRT"
DS785UM1
Need help?
Do you have a question about the EP93 Series and is the answer not in the manual?