Epson S1D13705 User Manual
Page 104

Page 10
Epson Research and Development
Vancouver Design Center
S1D13705
Programming Notes and Examples
X27A-G-002-03
Issue Date: 02/01/22
The following are the formulae for determining the frame rate of a panel. The formula for
a single passive or TFT panel is calculated as follows:
for a dual passive panel the formula is:
where: PCLK
= Pixel clock (in Hz)
HDP
= Horizontal Display Period (in pixels)
HNDP
= Horizontal Non-Display Period (in pixels)
VDP
= Vertical Display Period (in lines)
VNDP
= Vertical Non-Display Period (in lines)
In addition to varying the HNDP and VNDP times we can also select divider values which
will reduce CLKi to one half, one quarter up to one eight of the CLKi value. The example
below is a portion of a ’C’ routine to calculate HNDP and VNDP from a desired frame rate.
for (int loop = 0; loop < 2; loop++)
{
for (VNDP = 2; VNDP < 0x3F; VNDP += 3)
{
// Solve for HNDP
HNDP = (PCLK / (FrameRate * (VDP + VNDP))) - HDP;
if ((HNDP >= 32) && (HNDP <= 280))
{
// Solve for VNDP.
VNDP = (PCLK / (FrameRate * (HDP + HNDP))) - VDP;
// If we have satisfied VNDP then we're done.
if ((VNDP >= 0) && (VNDP <= 0x3F))
goto DoneCalc;
}
}
// Divide ClkI and try again.
// (Reg[02] allows us to dived CLKI by 2)
PCLK /= 2;
}
// If we still can't hit the frame rate - throw an error.
if ((VNDP < 0) || (VNDP > 0x3F) || (HNDP < 32) || (HNDP > 280))
{
sprintf("ERROR: Unable to set the desired frame rate.\n");
exit(1);
}
FrameRate
PCLK
HDP
HNDP
+
(
)
VDP
VNDP
+
(
)
×
-----------------------------------------------------------------------------------------
=
FrameRate
PCLK
2
HDP
HNDP
+
(
)
VDP
2
------------
VNDP
+
Ч
Ч
---------------------------------------------------------------------------------------------------
=