Epson S1D13708 Camera Accessories User Manual


 
Epson Research and Development Page 55
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 7: In SwivelView 180
°
, program the PIP
+
window registers for a 320x240
panel at 4 bpp, with the PIP
+
window positioned at SwivelView 180
°
co-
ordinates (80, 60) with a width of 160 and a height of 120.
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 horizontal coordinates of the PIP
+
window’s
bottom right and top left corner. The PIP
+
Window Y Positions register sets the verti-
cal coordinates of the PIP
+
window’s bottom right and top left corner.
The required values are calculated as follows:
X Start Position
= (panel width - x2 - 1) ÷ (32 ÷ bpp)
= (320 - (80 + 160 - 1) - 1) ÷ (32 ÷ 4)
= 10
= 0Ah
Y Start Position
= panel height - y2 - 1
= 240 - (60 + 120 - 1) - 1
= 60
= 3Ch
X End Position
= (panel width - x1 - 1) ÷ (32 ÷ bpp)
= (320 - 80 - 1) ÷ (32 ÷ 4)
= 29.875
= 1Dh (truncated fractional part)
Y End Position
= panel height - y1 - 1
= 240 - 60 - 1
= 179
= B3h
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]=0Ah
REG[85h]=00h
REG[8Ch]=1Dh
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]=3Ch
REG[89h]=00h
REG[90h]=B3h
REG[91h]=00h
Note that the values of REG[84h] through REG[91h] do not go into effect until
after REG[91h] is written.