
VIII PERIPHERAL MODULES 6 (LCD): LCD CONTROLLER (LCDC)
S1C33E07 TECHNICAL MANUAL
EPSON
VIII-1-63
VIII
LCDC
VIII.1.10 Precautions
The LCDC clock supply cannot be stopped while the LCD displays a screen. Before the LCDC clock supply can
be stopped, the LCDC must enter power save mode.
When using an STN panel, the registers for setting the HR-TFT timing parameters must be set to 0x0.
Display addresses and positions are specified with a word boundary address or in word units, therefore the Main
Window Line Address Offset Register (D[9:0]/0x301A74) must be set to a multiple of (32 bits
÷ bpp). Depend-
ing on the LCD horizontal resolution and the bpp mode selected, it may be necessary to reserve a larger image
area than the LCD panel resolution and set the appropriate line address offset even if the application does not
need a lager image than the LCD panel to be displayed.
For example, if the LCD width and image width are 240 pixels in 1-bpp mode,
Line address offset = 240
× 1 / 32 = 7.5 [words]
In this case, MWLADR[9:0] (D[9:0]/0x301A74) must be set to 8. Furthermore, the image must be prepared in
256 (8
× 32) pixels wide.
MWLADR[9:0]: Main Window Line Address Offset Bits in the Main Window Line Address Offset Register
(D[9:0]/0x301A74)
When a TFT LCD panel is used with the S1C33E07 TFT LCD interface selected (TFTSEL (D31/0x301A60) = 1),
the VNDPF flag (D7/0x301A04) may be fixed at 1 (vertical non-display period) in some rare cases depending on
the timing. This means that the flag cannot normally indicate the vertical display and vertical non-display periods
in the TFT interface.
TFTSEL: HR-TFT Panel Select Bit in the LCDC Display Mode Register (D31/0x301A60)
VNDPF: Vertical Display Status Flag in the Status and Power Save Configuration Register (D7/0x301A04)
How to solve this problem
For example, when the application needs to know a vertical non-display period to perform the following process-
ing (switching the system clock in a vertical non-display period):
(1) The system clock is 60 MHz (using the PLL) and the TFT LCD is displaying.
(2) The program detects a vertical non-display period and switches the system clock to 12 MHz while keeping
the TFT LCD displayed.
(3) The program sets the CPU to enter HALT mode.
To realize the above processing, use the following procedure to detect a vertical non-display period:
(1) The system clock is 60 MHz (using the PLL) and the TFT LCD is displaying.
(2) Set the Clock Control Register of a 16-bit timer.
(3) Set the Comparison Data B Setup Register of the 16-bit timer.
(4) Clear the 16-bit timer compare-match B interrupt flag.
(5) Detect the FPFRAME signal by reading the data register of the I/O port that has been configured for the
FPFRAME output and run the 16-bit timer when the FPFRAME signal is asserted (high level is detected
when FPFRAME is configured to high active, or low level is detected when it is configured to low active).
(6) Detect that the 16-bit timer compare-match B interrupt flag is set (it means that a vertical non-display pe-
riod is detected).
(7) Switch the system clock to 12 MHz.
(8) Enter HALT mode.
Use the following equation to calculate the comparison data B to be set to the 16-bit timer:
1
Comparison Data B = ————
× ((VDPS + VDP) × HT - VPS’) × ft16
ffpshift
ffpshift: LCDC FPSHIFT clock frequency [Hz]
VDPS: Vertical display period start position (VDPS = VDPSCNT[9:0] [lines])
VDPSCNT[9:0]: D[9:0]/0x301A24
VDP:
Vertical display period (VDP = VDPCNT[9:0] +1 [lines])
VDPCNT[9:0]: D[9:0]/0x301A14
HT:
Horizontal total period (HT = (HTCNT[6:0] +1)
× 8 [Ts])
HTCNT[6:0]:
D[22:16]/0x301A10
VPS’: Vertical sync pulse start position (VPS’ = FPFST[9:0]
× HT + FPFSTO[9:0] [Ts])
FPFST[9:0]:
D[25:16]/0x301A2C
FPFSTO[9:0]:
D[9:0]/0x301A30
ft16:
16-bit timer x clock frequency [Hz]