Utilize microcontroller I/O port to directly drive LCD

Publisher:psi33Latest update time:2006-12-15 Source: 单片机及嵌入式系统应用Keywords:TFT Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  How to reduce the cost of small household appliances while ensuring their performance is a higher requirement for application engineers. This control panel requires temperature control, and the display interface requires LCD display. The cost of a single-chip microcomputer with a dedicated LCD driver and A/D converter is too high, so the single-chip microcomputer EM78P259N with A/D from Taiwan's Elan Company is selected to directly drive the LCD. This single-chip microcomputer has high cost performance and reliable performance, and is very suitable for application in home appliance control.

1 Introduction to LCD

  Currently, mainstream LCDs (liquid crystal displays) on the market are divided into the following categories: TN (twisted array type), STN (super twisted array type), DSTN (double layer super twisted array), HPA (high performance addressing or fast DSTN), TFT (Thin film field effect transistor) etc. Due to cost factors, most small home appliances currently use TN-type monochrome LCD displays. Its principle is to pour liquid crystal between two planes with fine grooves. The grooves on these two planes are perpendicular to each other (intersecting at 90°). That is to say, if the molecules on one plane are arranged north-south, the molecules on the other plane are arranged east-west, and the molecules located between the two planes Forced into a 90° twisted state. Since light travels along the direction of the arrangement of molecules, the light is also twisted 90° when passing through the liquid crystal. When a voltage is applied to the liquid crystal, the molecules will rearrange themselves vertically, allowing light to shine directly without any twisting. The LCD is composed of two mutually perpendicular polarization filters, so under normal circumstances it should block all light trying to penetrate. However, since the space between the two filters is filled with twisted liquid crystals, after the light passes through the first filter, it will be twisted 90° by the liquid crystal molecules and finally pass through the second filter. On the other hand, if a voltage is applied to the liquid crystal, the molecules will rearrange and become completely parallel, so that the light is no longer twisted, so it is blocked by the second filter. In short, when power is applied, the light will be blocked, and when power is not applied, the light will be emitted. The LCD model can be viewed as a capacitor, with one electrode connected to the common plate and the other connected to the character segment. The LCD is controlled by the root mean square value of the voltage. When the voltage applied to the LCD is zero, the LCD is transparent. When the voltage applied to the character segment and the common pole is greater than the threshold voltage of the LCD, the character segment is displayed. If DC is used to drive the LCD, it will cause permanent damage to the display unit. In order to prevent irreversible electrochemical reactions from damaging the LCD, the voltage applied to all character segments must periodically reverse polarity so that the average voltage applied to the character segments is 0. In order to save the I/O port line of the microcontroller, the multiplexing method is used to drive the LCD.

2 Introduction to microcontroller EM78P259N

  EM78P259N is an 8-bit microcontroller launched by Taiwan's Elan Corporation. The pins are shown in Figure 1.


figure 1

  The main functions are as follows:

  ◆ Operating voltage range is 2.3~5.5 V;
  ◆ Operating frequency (based on clock divided by 2), DC—20 MHz/2 CLKS, 5 V in Crystal mode, DC—8 MHz/2 CLKS, 3 V, in RC Mode: DC—4 MHz/2 CLKS, 5 V, DC—4 MHz/2 CLKS, 3 V;
  ◆ Low power consumption, operating current is less than 1.9 mA at 5 V/4 MHz, operating at 3 V/32 kHz The current is 15 μA, and the power consumption in sleep mode is 1 μA;
  ◆ Built-in RC oscillator, 4 MHz, 8 MHz, 1 MHz, 455 kHz (with automatic calibration);
  ◆ 80 B RAM;
  ◆ 2K×13 program space;
  ◆ Bidirectional I/O port;
  ◆ 8-level stack depth;
  ◆ 3 8-bit timers, 1 16-bit timer;
  ◆ 1 comparator;
  ◆ 4-channel 12-bit precision A/D conversion.

3 Implementation method of directly driving LCD through I/O port

  The following introduces the driving method of multiplexed display. The circuit diagram is shown in Figure 2. The time that all common electrodes (COM) apply a scanning voltage to each is called a frame, the frequency of how many frames are scanned per unit time is called the frame frequency, and the ratio of the scanning time of the common electrode (COM) to the frame period is called the duty cycle . Usually the duty cycle is equal to the reciprocal of the number of common electrodes N, that is, 1/N. Since in the multiplexed display driving method, pixels are divided into gated pixels, non-gated pixels and half-gated pixels. A certain voltage is added to them, so the average voltage method is introduced. The ratio of the voltage on the gated pixel to the voltage on the non-strobed pixel is often referred to as the LCD bias ratio. In dynamic display, in order for a certain pixel of the LCD to display, it is necessary to cyclically use the common level scan pulse (COM) and the segment scan pulse (SEG) on the pixel to synthesize an operating voltage that exceeds the liquid crystal threshold voltage (and average voltage) to complete. Ultimately, the average voltage method averages the voltage on the semi-selected pixels and the voltage of the non-selected pixels, and moderately increases the voltage of the non-selected pixels to offset part of the voltage of the semi-selected pixels, thereby expanding the relationship between the selected pixels and the semi-selected pixels. The voltage gap between them improves the display contrast and makes the display of non-selected pixels and semi-selected pixels more uniform.


figure 2

  According to the characteristics of the microcontroller, the 1/2 bias and 1/2 duty cycle methods are used to drive the LCD. Now take the LCD with COM=2, SEG=4 as an example: the LCD screen has a total of 8 pixels, and the common pole has 2 poles. The segments are 4 segments.

  The waveform generated by the common pole signal is shown in Figure 3.

  As can be seen from Figure 3, the common pole signal generation can be divided into four stages: S0, S1, S2 and S3.

  S0: COM0=+5V,COM1=+2.5V.
  S1: COM0=+2.5V,COM1=+5V.
  S2: COM0=0 V, COM1=+2.5 V.
  S3: COM0=+2.5 V, COM1=0 V.


image 3

  In this way, in the S0 stage, the gated pixels can only be pixels connected to COM0, and the SEG segment must be 0 V before the pixel will light up. The pixels connected to COM1 can only be non-gated pixels or half-gated pixels, and the voltage of the half-gated pixel is lower than the threshold voltage for the LCD to light up, so the pixels connected to COM1 will not light up at this time. In the S1 stage, the gated pixels can only be pixels connected to COM1, and the SEG segment must be 0 V for the pixel to light up. The pixels connected to COM0 can only be non-gated pixels or half-gated pixels, and the voltage of the half-gated pixel is lower than the threshold voltage for the LCD to light up, so the pixels connected to COM0 will not light up at this time.

  In the S2 stage, the gated pixels can only be pixels connected to COM0, and the SEG segment must be +5 V before the pixel will light up. At the same time, the polarity of the voltage driving the LCD is opposite. The pixel connected to COM1 can only be a non-gated pixel or a half-gated pixel, and the voltage of the half-gated pixel is lower than the threshold voltage for the LCD to light up, so it is connected to COM1 at this time. None of the pixels will light up.

  In the S3 stage, the gated pixel can only be the pixel connected to COM1, and the SEG segment must be +5 V before the pixel will light up. At the same time, the polarity of the voltage driving the LCD is opposite. The pixel connected to COM0 can only be a non-gated pixel or a half-gated pixel, and the voltage of the half-gated pixel is lower than the threshold voltage for the LCD to light up, so it is connected to COM0 at this time. None of the pixels will light up.

  Conclusion

  Using the method provided above, as long as the LCD does not display many pixels, it can be directly driven by a microcontroller with a bidirectional port, and the common pole (COM) can be expanded to 3 or more.

references

1 Guo Qiang. Liquid crystal display application technology. Beijing: Electronic Industry Press, 2003

Keywords:TFT Reference address:Utilize microcontroller I/O port to directly drive LCD

Previous article:Interface application between LCD controller SED1330 and DSP
Next article:Design of Chinese character LCD intelligent display module based on 51 microcontroller

Recommended ReadingLatest update time:2024-11-16 20:59

TFT2.4 color screen 3 [self-made animation effect - slider + hook]
_ : The pins are the same as the previous connections, but here a useful animation effect is made to simulate the 2D view of the crane. 9325tp.h  1 #ifndef __ILI9325_H__  2 #define __ILI9325_H__  3   4 void ILI9325_Initial(void);  5 void Write_Cmd_Data(unsigned char x, unsigned int y);  6 void Write_Cmd(unsigned char
[Microcontroller]
STM32 drives TFT display ILI9325
  2.4-inch TFT240370PQ display, driver IC is ILI9325. The screen power supply is 2.8~3.3V, the backlight power supply is up to 3.2V (20Ω resistor in series at 3.3V power supply or 200Ω resistor in series at 5V power supply), compatible with 8/16-bit data interface (optional). Theoretically, the data port
[Microcontroller]
Design and implementation of a color TFT-LCD module based on ARM9
1 Introduction TFT-LCD has been widely used in image display systems because of its thin thickness and excellent picture quality, which can realize high-speed, high-brightness and high-contrast display of information. Although TFT-LCD has good display performance, the driving signal of TFT-LCD is very compl
[Microcontroller]
Design and implementation of a color TFT-LCD module based on ARM9
Realization of 5-inch TFT-LCD Remote Control System Using 51 Single-Chip Microcomputer
LCD has been widely used in industrial and civilian fields such as computer monitors, VCD display panels, and portable medical equipment due to its thin, light and low power consumption. In these products, the application of single-chip microcomputers can greatly improve their intelligence and ease of use, bring
[Microcontroller]
Realization of 5-inch TFT-LCD Remote Control System Using 51 Single-Chip Microcomputer
Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号