HT8 MCU Integrated LCD Application Guideline - holtek.com · HT8 MCU Integrated LCD Application...
Transcript of HT8 MCU Integrated LCD Application Guideline - holtek.com · HT8 MCU Integrated LCD Application...
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 1 / 13 December 11, 2016
HT8 MCU Integrated LCD Application Guideline
D/N: AN0410E
Introduction The Holtek LCD type MCUs provide four LCD driving schemes including the R type, C
type, SCOM type as well as SCOM and SSEG type, each of which has its own features.
This guideline will firstly introduce the LCD driving principle and then gradually introduce
the usage, advantages and disadvantages of each driving type. With the help of this
guideline, users will have a deeper understanding of the Holtek LCD type MCUs and use
them more proficiently.
Functional Description
LCD Display Basic Principle Description
The Liquid Crystal Display, also known as LCD, is a technology that uses of the physical
structure and optical characteristics of the liquid crystal molecules for display.
Features of liquid crystal molecules:
Liquid crystal molecules are rod-like structure macromolecules in a state between solid and liquid.
In their natural form, they are characterised by optical anisotropy. In an electric (magnetic) field, they are characterised by isotropy.
The following section uses the basic structure of the direct-view style simple multiplexer
TN/STN LCD panel to describe the LCD basic display principle, as shown below.
Polarizer PolarizerGlass SubstrateGlass SubstrateLiquid Crystals Coating
Twisted Structure
ACNatural Light
(a) No voltage is applied between the glass substrates
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 2 / 13 December 11, 2016
Polarizer PolarizerGlass SubstrateGlass SubstrateLiquid Crystals Coating
Twisted Structure
ACNatural Light
(b) A voltage is applied between the glass substrates
LCD Basic Display Principle
A complete LCD panel is composed of the upper and lower glass substrates and
polarizers. Between the upper and lower glasses, the liquid crystal molecules are
regularly coated in a twisted structure. The electrodes are etched on the inside faces of
the upper and lower glass substrates using an ITO metal compound. As shown in the
figures, the liquid crystal molecules which are arranged in a twisted structure have the
optical activity. The polarization angles of the upper and lower polarisers are mutually
perpendicular. When the voltage between the upper and lower glasses is zero, only the
natural light with the same direction as the first polariser can pass through it and reach the
twisted liquid crystals coating. Due to the optical activity, the entered light is rotated by 90
degrees in direction and illuminates on the other polariser. Since the polarisation angles
of the upper and lower polarisers are mutually perpendicular, the entered light can
completely pass through the polariser on the other side and reaches the viewer’s eyes, in
which case, the LCD appears white. When there is an AC voltage applied between the
two glasses, on the effect of an electric (magnetic) field the liquid crystals structure is
changed from the twisted form to the synthetic form, which will have no rotation effect on
the entered light direction. Due to the aforementioned feature of the two polarisers, the
entered light is blocked from passing through the other polariser to reach the viewer’s
eyes, in which case the LCD appears black. The LCD white (on) and black (off) states are
implemented by applying different AC voltages between the upper and lower glass
substrates.
There are several critical parameters regarding the liquid crystal analog driving voltage.
AC voltage: The nature of liquid crystals determines that they can only be driven by an AC voltage. The long existence of a DC voltage applied to the liquid crystals will influence their electrical and chemical characteristics and may cause permanent damages such as blurred display and reduced lifetime, etc.
Scanning frequency: The frequency of the AC voltage applied to drive the liquid crystals is generally in the range of 60~100Hz. The actual frequency is determined by the LCD panel area and design. If the frequency is too high, it will lead to an increase in driver power consumption. If the frequency is too low, it will result in display flashing, which will also occur when there is a multiple relationship between the scanning frequency and light source frequency.
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 3 / 13 December 11, 2016
Frame Schematic Diagram
The liquid crystal molecule is a voltage integral type material. Its distortion degree, or
transmittance, is only related to the voltage effective value between the two glasses and
unrelated to the charging wave. The voltage effective value, which is expressed as
V(RMS), equals to the RMS value of the voltage on the COM pin minus the voltage on the
SEG pin.
V(RMS) = 2
0
1 ])t(V[T
T
∫ dt
The cut-off point of the LCD black (un-transparent) and white (transparent) display RMS
voltages, is called as turn on voltage, Vth. When the RMS voltage exceeds Vth, the
rotation angle of the twisted structure increases resulting in a significant change in light
transmittance and in turn a significant rise in transparent degree, whereas the transparent
degree decreases greatly. The relationship between the light transmittance and the RMS
voltage value is shown below.
Light Transmittance vs. AC Voltage RMS Value
The LCD driver in a LCD type microcontroller is controlled by the system to generate the
required driving waves according to the user-defined display image. The driving signals
are connected to the LCD panel to turn on the associated pixels for the desired display
result.
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 4 / 13 December 11, 2016
Duty
This parameter is also known as Duty counts or COM counts. The STN/TN type LCDs
usually use the dynamic time-sharing scan mode, in which case the ratio of the valid
enable time of each COM to the whole scanning cycle, namely duty, is fixed and equals to
1/COM counts.
Bias
The driving waves applied to the LCD SEG and COM driver are analog signals. The ratio
of each voltage level to the maximum LCD output voltage is indicated as bias. Usually,
the bias indicates the ratio of the lowest voltage level to the maximum output voltage.
Take a look at the following example with a configuration of 1/4 duty and 1/3 bias.
LCD Driver Waveform
The above figure shows the waveform with a configuration of 1/4 duty and 1/3 bias. There
are four COMs so the ratio of the valid enable time of each COM to the entire scanning
cycle is 1/4. There are three analog driving voltage levels, V3 is the maximum output
voltage level, V2 and V1 are the medium voltage levels and V1/V3 equals to 1/3. That is
how the configuration of 1/4 duty and 1/3 bias is implemented.
Generally, there is a certain relationship between the bias and duty parameters. The
larger the duty is the shorter the scanning time of each COM will be. To achieve the same
display brightness and display contrast, the Von value should be increased, and the
difference between the select level and unselect level should be greater which means the
bias value should be larger. The relationship between duty and bias is expressed as the
following formula.
Bias = 1 / ( Duty +1)
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 5 / 13 December 11, 2016
R Type and C Type LCD For R type biasing its bias voltage is supplied by internal bias resistors. For C type biasing
its bias voltage is supplied by an internal charge pump. Take the BS67Fxx series as an
example.
Device Duty Bias Bias Type Wave Type
BS67F340 BS67F350 BS67F360
1/4 1/3 R or C A or B
LCD Selections
QT: Quick charging time determined by QCT [2:0]
QTCOMn
PLCD
VA control
VAQuick charging control
QCT
Note: When the R type LCD is disabled, the DC path will be switched.
VIN
VB
VC
LCDEN
R Type Bias Configuration − 1/3 Bias
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 6 / 13 December 11, 2016
Note: The pin VMAX must be connected to the maximum voltage to prevent from the pad leakage.
Power Supply from pin V2
Charge Pump
VA=V1=3*VIN
VB=PLCD=2*VIN
VC=V2=VIN
0.1uF
0.1uF
0.1uF
C1
C2
V1
V2
VMAX
PLCD
VIN
VDD or V1
Charge Pump
VA=V1=VIN
VB=PLCD=2/3*VIN
VC=V2=1/3*VIN
0.1uF
0.1uF
0.1uF
C1
C2
V1
V2
VMAX
PLCD
Power Supply from pin V1
VIN
VDD or V1
Charge Pump
VA=V1=3/2*VIN
VB=PLCD=VIN
VC=V2=1/2*VIN
0.1uF
0.1uF
0.1uF
C1
C2
V1
V2
VMAX
PLCD VIN
Power Supply from pin PLCD
VDD or V1
C Type Bias External Power Supply Configuration − 1/3 Bias
Note: The pin VMAX must be connected to the maximum voltage to prevent from the pad leakage.
Power Supply from VA
Charge Pump
VA=V1=VIN
0.1uF
0.1uF
C1
C2
V1
V2
VMAX
PLCD
V1
0.1uF
VDDVIN
VB=PLCD=2/3*VIN
VC=V2=1/3*VIN
0.1uF
Charge Pump
0.1uF
0.1uF
C1
C2
V1
V2
VMAX
PLCD
Power Supply from VB
V1
VA=V1=3/2*VIN
VDDVIN VB=PLCD=VIN
VC=V2=1/2*VIN
0.1uF
0.1uF
Power Supply from VC
Charge Pump
0.1uF
0.1uF
C1
C2
V1
V2
VMAX
PLCD
VDD or V1
VA=V1=3*VIN
VREFINVIN
VB=PLCD=2*VIN
VC=V2=VIN
0.1uF
0.1uF
C Type Bias Internal Power Supply Configuration − 1/3 Bias
Power Consumption
The R type biasing is quite suitable for LCD screens with a larger load current but
generates higher power consumption. The C type biasing generates lower power
consumption but provides a smaller current to the external loads. The table below
presents the LCD DC electrical characteristics of the BS67Fxx series for reference.
Symbol Parameter Test Conditions Min. Typ. Max. Unit VDD Conditions
ILCD
Additional Current Consumption for LCD Enable (R type)
3V RT=1170KΩ, VA=VPLCD=VDD, 1/3 bias, no load
12.5 μA
5V 25 μA
3V RT=225KΩ, VA=VPLCD=VDD, 1/3 bias, no load
25 μA
5V 50 μA
3V RT=60KΩ, VA=VPLCD=VDD, 1/3 bias, no load
100 μA
5V 160 μA
Additional Current Consumption for LCD Enable (C type)
3V No load, C type
2 μA
5V 2.6 μA
ILCDOL LCD Common and Segment Sink Current
3V VOL = 0.1VDD 210 420 μA 5V 350 700 μA
ILCDOH LCD Common and Segment Source Current
3V VOH = 0.9VDD -80 -160 μA 5V -180 -360 μA
As the table shows, when the VDD is 3V, the smallest LCD driving current is 12.5µA for the
R type and 2µA for the C type.
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 7 / 13 December 11, 2016
LCD Memory
An area of Data Memory is especially reserved for use for the LCD display data. This data
area is known as the LCD Memory. Any data written here will be automatically read by the
internal display driver circuits, which will in turn automatically generate the necessary
LCD driving signals. Therefore any data written into this Memory will be immediately
reflected into the actual display connected to the microcontroller. As the LCD Memory
addresses overlap those of the General Purpose Data Memory, it is stored in its own
independent Sector 4 area. The Data Memory sector to be used is chosen by using the
Memory Pointer high byte register, which is a special function register in the Data Memory,
with the name, MP1H or MP2H. To access the LCD Memory therefore requires first that
Sector 4 is selected by writing a value of 04H to the MP1H or MP2H register. After this,
the memory can then be accessed by using indirect addressing through the use of
Memory Pointer low byte, MP1L or MP2L. With Sector 4 selected, then using MP1L or
MP2L to read or write to the memory area, starting with address “00H”, will result in
operations to the LCD Memory. Directly addressing the LCD Display Memory can be
applicable using the extended instructions for the full range address access.
The accompanying LCD Memory Map diagram shows how the internal LCD Memory is
mapped to the Segments and Commons of the display for one device of this series.
00H
01H
02H
03H
1CH
1DH
1EH
1FH
SEG 0
SEG 1
SEG 2
SEG 3
SEG 31
SEG 30
SEG 29
SEG 28
b3 b2 b1 b0
CO
M 0
CO
M 1
CO
M 2
CO
M 3
32 SEG x 4 COM
BS67F350 LCD Memory Map
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 8 / 13 December 11, 2016
LCD Registers
There are control registers, named as LCDC0 and LCDC1, in the Data Memory which are
used to control the various setup features of the LCD Driver. Various bits in these
registers control functions such as LCD wave type, bias type, supply power selection,
total bias resistor selection together with the overall LCD enable and disable control.
The LCDEN bit in the LCDC0 register, which provides the overall LCD enable/disable
function, will only be effective when the device is in the NOAMRL, SLOW or IDLE Mode. If
the device is in the SLEEP Mode then the display will always be disabled. Bits,
RSEL2~RSEL0, in the LCDC0 register select the internal total bias resistors to supply the
LCD panel with the proper R type bias current. A choice to best match the LCD panel
used in the application can be selected also to minimise bias current. The TYPE bit in the
LCDC0 register is used to select whether Type A or Type B LCD waveform signals are
used. The RCT bit in the same register is used to select whether R Type or C Type LCD
bias is used. The LCDP1 and LCDP0 bits are used to select that the LCD supply power
comes from either the external pin or internal power supply for C type bias application.
The PLCD3~PLCD0 bits in the LCDC1 register are used to select the VA voltage for R
type bias circuitry. The QCT2~QCT0 bits in the same register are used to determine the
quick charge time period.
Register Name
Bit
7 6 5 4 3 2 1 0
LCDC0 TYPE RCT LCDP1 LCDP0 RSEL2 RSEL1 RSEL0 LCDEN
LCDC1 QCT2 QCT1 QCT0 PLCD3 PLCD2 PLCD1 PLCD0
LCD Voltage Source and Biasing
The time and amplitude varying signals generated by the LCD driver function require the
generation of several voltage levels for their operation. The devices can have either R
type or C type biasing selected via a software control bit named RCT. Selecting the C
type biasing will enable an internal charge pump circuitry.
R Type Biasing
For R type biasing an external LCD voltage source must be supplied on pin PLCD to
generate the internal biasing voltages. This could be the microcontroller power supply
VDD or some other voltage source equal to or less than VDD. For the R type 1/3 bias
scheme, four voltage levels VSS, VA, VB and VC are utilised. The voltage VA is selected by
the PLCD3~PLCD0 bits to be equal to a specific ratio of VPLCD varying from 8/16 VPLCD to
VPLCD. The voltage VB is equal to VA×2/3 while the voltage VC is equal to VA×1/3.
Different values of internal bias resistors can be selected using the RSEL2~RESEL0 bits
in the LCDC0 register. This along with the voltage on pin PLCD will determine the bias
current. The VMAX pin should be connected to the VDD pin since the available maximum
voltage applied to the PLCD pin is equal to VDD. Note that no external capacitors or
resistors are required to be connected if R type biasing is used.
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 9 / 13 December 11, 2016
Condition VMAX Connection
VDD ≥ VPLCD Connect VMAX to VDD
VDD < VPLCD Forbidden condition
R Type Bias VMAX Pin Connection
C Type Biasing
For C type biasing the LCD voltage source can be supplied on the external pin or derived
from the internal voltage source, which is selected using the LCDP1 and LCDP0 bits in
the LCDC0 register. The LCD voltage source which is used to generate the required
biasing voltages, is supplied on the external pin PLCD, V1 or V2 when the LCDP1 and
LCDP0 bits equal to 00B, or is derived from the internal voltage source when these bits
equal to 01B, 10B or 11B. The C type biasing scheme using an internal charge pump
circuit can generate voltages higher than what is supplied on PLCD. This feature is useful
in applications where the microcontroller supply voltage is less than the supply voltage
required by the LCD. Additional charge pump capacitors must also be connected
between pins C1 and C2 to generate the necessary voltage levels.
LCD Power Supply VA Voltage VB Voltage VC Voltage
External Power Supply
VIN on V1 VIN 2/3 × VIN 1/3 × VIN VIN on PLCD 3/2 × VIN VIN 1/2 × VIN
VIN on V2 3 × VIN 2 × VIN VIN
Internal Power Supply
VDD on VA VDD 2/3 × VDD 1/3 × VDD VDD on VB 3/2 × VDD VDD 1/2 × VDD
VREFIN on VC 3 × VREFIN 2 × VREFIN VREFIN
C Type Bias Power Supply Scheme
The connection to the VMAX pin depends upon the LCD power supply scheme. It is
extremely important to ensure that these charge pump generated internal voltages do not
exceed the maximum VDD voltage of 5.5V.
Condition VMAX Pin Connection
VDD > VPLCD × 1.5 Connect VMAX to VDD
Otherwise Connect VMAX to V1
C Type Bias VMAX Pin Connection
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 10 / 13 December 11, 2016
LCD Driver with SCOM Function Take the HT66Fxx series as an example, the LCD common pins SCOM0~SCOM3 are
pin-shared with PC0~PC3 or PC0~PC1, PC6~PC7. The LCD control signals are
implemented by the application program.
LCD Operation
An external LCD panel can be driven using the device by configuring the PC0~PC3 or
PC0~PC1, PC6~PC7 as common pins and using other output port lines as segment pins.
The LCD driver function is controlled using the SCOMC register which in addition to
controlling the overall on/off function also controls the bias voltage setup function. This
enables the LCD COM driver to generates the necessary VDD/2 voltage level for LCD 1/2
bias operation.
The SCOMEN bit in the SCOMC register is the overall master control for the LCD driver,
however this bit is used in conjunction with the COMnEN bits to select which Port C pins
are used for LCD driving. Note that the Port Control register does not need to first setup
the pins as outputs to enable the LCD driver operation.
SCOM operating current
SCOM0~SCOM3
SCOMEN
VDD/2
VDD
COMnEN
LCD COM Bias
SCOMEN COMnEN Pin Function O/P Level
0 X I/O 0 or 1
1 0 I/O 0 or 1
1 1 SCOMn VDD/2
Output Control
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 11 / 13 December 11, 2016
LCD Bias Control
The LCD driver enables a range of selections to be provided to suit the requirement of the
LCD panel which is being used. The bias resistor choice is implemented using the ISEL1
and ISEL0 bits in the SCOMC register.
Bit 7 6 5 4 3 2 1 0
Name D4 ISEL1 ISEL0 SCOMEN COM3EN COM2EN COM1EN COM0EN
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 0 0 0 0 0 0 0
LCD Driver with SCOM and SSEG Functions Take the HT66F0175/HT66F0185 series as an example,the devices have the capability
of driving external LCD panels. The common and segment pins for LCD driving,
SCOM0~SCOM5 and SSEG0~SEEG19 or SSEG0~SEEG23, are pin-shared with certain
pins on the I/O ports. The LCD signals, COM and SEG, are generated using the
application program.
LCD Operation
An external LCD panel can be driven using the device by configuring the I/O pins as
common pins and segment pins. The LCD driver function is controlled using the LCD
control registers which in addition to controlling the overall on/off function also controls
the R type bias current on the SCOM and SSEG pins. This enables the LCD COM and
SEG driver to generate the necessary VSS, (1/3)VDD, (2/3)VDD and VDD voltage levels for
LCD 1/3 bias operation.
The LCDEN bit in the SLCDC0 register is the overall master control for the LCD driver.
This bit is used in conjunction with the COMnEN and SEGmEN bits to select which I/O
pins are used for LCD driving. Note that the corresponding Port Control register does not
need to first setup the pins as outputs to enable the LCD driver operation.
VDD
(2/3) VDD
(1/3) VDD
VDD
LCDVoltageSelectCircuit
LCDCOM/SEG
Analog Switch
LCDEN
ISEL[1:0]
COMnEN COMSEGSn66
SEGmEN
FRAME
SCOM0/SSEG0
SCOM5/SSEG5
SSEG6
SSEGm
m = 19 for HT66F0175m = 23 for HT66F0185
Software Controlled LCD Driver Structure
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 12 / 13 December 11, 2016
LCD Control Registers
The LCD COM and SEG driver enables a range of selections to be provided to suit the
requirement of the LCD panel which is being used. The bias resistor choice is
implemented using the ISEL1 and ISEL0 bits in the SLCDC0 register. All COM and SEG
pins are pin-shared with I/O pins and are selected using the corresponding pin function
selection bit in the SLCDCn register.
Register Name
Bit
7 6 5 4 3 2 1 0
SLCDC0 FRAME ISEL1 ISEL0 LCDEN COM3EN COM2EN COM1EN COM0EN
SLCDC1 COM5EN COM4EN COMSEGS5 COMSEGS4 COMSEGS3 COMSEGS2 COMSEGS1 COMSEGS0
SLCDC2 SEG13EN SEG12EN SEG11EN SEG10EN SEG9EN SEG8EN SEG7EN SEG6EN
SLCDC3 — — SEG19EN SEG18EN SEG17EN SEG16EN SEG15EN SEG14EN
LCD Driver Control Registers List − HT66F0175
Register Name
Bit
7 6 5 4 3 2 1 0
SLCDC0 FRAME ISEL1 ISEL0 LCDEN COM3EN COM2EN COM1EN COM0EN
SLCDC1 COM5EN COM4EN COMSEGS5 COMSEGS4 COMSEGS3 COMSEGS2 COMSEGS1 COMSEGS0
SLCDC2 SEG13EN SEG12EN SEG11EN SEG10EN SEG9EN SEG8EN SEG7EN SEG6EN
SLCDC3 SEG21EN SEG20EN SEG19EN SEG18EN SEG17EN SEG16EN SEG15EN SEG14EN
SLCDC4 — — — — — — SEG23EN SEG22EN
LCD Driver Control Registers List − HT66F0185
Conclusions This guideline has introduced several Holtek MCU LCD driving schemes. The C type
scheme uses an internal charge pump to provide the bias voltage with lower power
consumption. The R type scheme uses the bias registers to provide the bias voltage with
higher power consumption. The remaining two types are the SCOM scheme and the
SCOM and SSEG scheme.
HT8 MCU Integrated LCD Application Guideline
AN0410E V1.00 13 / 13 December 11, 2016
Versions and Modify Information
Date Author Issue Release and Modification
2015.12.15 David, Xue (薛明列) First Version
Reference Files
Reference files: HT66F40, HT66F0175/0185 and BS67F350 DataSheet.
For more information, refer to the Holtek’s official website www.holtek.com.
Disclaimer
Disclaimer All information, trademarks, logos, graphics, videos, audio clips, links and other items
appearing on this website ('Information') are for reference only and is subject to change at
any time without prior notice and at the discretion of Holtek Semiconductor Inc.
(hereinafter 'Holtek', 'the company', 'us', 'we' or 'our'). Whilst Holtek endeavors to ensure
the accuracy of the Information on this website, no express or implied warranty is given
by Holtek to the accuracy of the Information. Holtek shall bear no responsibility for any
incorrectness or leakage.
Holtek shall not be liable for any damages (including but not limited to computer virus,
system problems or data loss) whatsoever arising in using or in connection with the use of
this website by any party. There may be links in this area, which allow you to visit the
websites of other companies. These websites are not controlled by Holtek. Holtek will
bear no responsibility and no guarantee to whatsoever Information displayed at such sites.
Hyperlinks to other websites are at your own risk.
Responsibility Limitation In no event shall Holtek Limited be liable to any other party for any loss or damage
whatsoever or howsoever caused directly or indirectly in connection with your access to
or use of this website, the content thereon or any goods, materials or services.
Governing Laws The Disclaimer contained in the website shall be governed by and interpreted in
accordance with the laws of the Republic of China. Users will submit to the non-exclusive
jurisdiction of the Republic of China courts.
Disclaimer Update Holtek reserves the right to update the Disclaimer at any time with or without prior notice,
all changes are effective immediately upon posting to the website.