Epson S1D13708 Camera Accessories User Manual


 
Epson Research and Development Page 59
Vancouver Design Center
Programming Notes and Examples S1D13708
Issue Date: 01/11/20 X39A-G-003-01
ADVANCE
D
IN
F
ORMATION
Subje
ct to C
ha
nge
Example 8: In SwivelView 270
°
, program the PIP
+
window registers for a 320x240
panel at 4 bpp, with the PIP
+
window positioned at SwivelView 270
°
co-
ordinates (60, 80) with a width of 120 and a height of 160.
1. Determine the value for the PIP
+
Window X Positions and PIP
+
Window Y Positions
registers. Let the top left corner of the PIP
+
window be (x1, y1), and let the bottom
right corner be (x2, y2), where x2 = x1 + width - 1 and y2 = y1 + height - 1. The PIP
+
Window X Positions register sets the vertical coordinates of the PIP
+
window’s top
right and bottom left corner. The PIP
+
Window Y Positions register sets the horizontal
coordinates of the PIP
+
window’s top right and bottom left corner.
The required values are calculated as follows:
X Start Position
= panel width - y2 - 1
= 320 - (80 + 160 - 1) - 1
= 80
= 50h
Y Start Position
= x1 ÷ (32 ÷ bpp)
= 60 ÷ (32 ÷ 4)
= 7.5
= 07h (truncated fractional part)
X End Position
= panel width - y1 - 1
= 320 - 80 - 1
= 239
= EFh
Y End Position
= x2 ÷ (32 ÷ bpp)
= (60 + 120 - 1) ÷ (32 ÷ 4)
= 22.375
= 16h (truncated fractional part)
2. Program the PIP
+
Window X Positions register with the X Start Position in
(REG[85h],REG[84h]) and the X End Position in (REG[8Dh],REG[8Ch]).
REG[84h]=50h
REG[85h]=00h
REG[8Ch]=EFh
REG[8Dh]=00h
Program the PIP
+
Window Y Positions register with the Y Start Position in
(REG[89h],REG[88h]) and the Y End Position in (REG[91h],REG[90h]).
REG[88h]=07h
REG[89h]=00h
REG[90h]=16h
REG[91h]=00h