Epson S1D13708 Camera Accessories User Manual


 
Page 52 Epson Research and Development
Vancouver Design Center
S1D13708 Programming Notes and Examples
X39A-G-003-01 Issue Date: 01/11/20
ADVANCE
D
IN
F
ORMATION
Subje
ct to C
ha
nge
Example 6: In SwivelView 90
°
, program the PIP
+
window registers for a 320x240
panel at 4 bpp, with the PIP
+
window positioned at SwivelView 90
°
coor-
dinates (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 corners. The PIP
+
Window Y Positions register sets the horizon-
tal coordinates of the PIP
+
window’s top right and bottom left corners.
The required values are calculated as follows:
X Start Position
= y1
= 80
= 50h
Y Start Position
= (panel height - x2 - 1) ÷ (32 ÷ bpp)
= (240 - (60 + 120 - 1) - 1) ÷ (32 ÷ 4)
= 7.5
= 07h (truncated fractional part)
X End Position
= y2
= 80 + 160 - 1
= 239
= EFh
Y End Position
= (panel height - x1 - 1) ÷ (32 ÷ bpp)
= (240 - 60 - 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