Application of LCD in motor soft starter

Publisher:andyliow1980Latest update time:2006-07-25 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  1 Introduction

  Because LCD liquid crystal displays have low power consumption, small size, light weight, ultra-thin and many other advantages that other displays cannot match, they have been widely used in various intelligent instruments and low-power electronic products. Dot matrix or graphic LCD can not only display characters and numbers, but also various graphics, curves and Chinese characters. It can also realize functions such as screen scrolling, animation, flashing, and text feature display. It has a wide range of uses.

  2 Keyboard design principles

  Using the 8-bit PIC16F877 microcontroller from Microchip Technology Company of the United States, the RB port level change interrupt is used to realize parameter modification. Through the table lookup method, more than 200 starting modes can be selected and more than 200 parameter values ​​can be input under the selected starting mode. The maximum selection value depends on the upper limit value of registers N and M, as shown in Figure 1.

  Reading the RB port status requires software debounce processing, that is, reading the RB port status, and then the software delays about 50ms before reading the RB port status. The same status twice indicates that the status is correct to prevent misoperation caused by jitter.

  3 Hardware wiring between Chinese LCD display LCM12832ZK and microcontroller PIC16F877

  In this design, the single-chip computer PIC16F877 and the Chinese LCD display LCM12832ZK adopt an analog serial communication method. The single-chip computer RD5 pin is connected to the LCD serial clock line E, the single-chip computer RD6 pin is connected to the LCD data line RW, and the single-chip computer RD7 pin is connected to the LCD serial select line. Pass through RS.


  As shown in Figure 2, R1 is used to adjust the brightness of the LCD backlight, and R2 is used to adjust the brightness of the Chinese subtitles on the LCD. Adjusting the potentiometer R2 to an appropriate value is very important for subtitle display. When R2 is too large, the LCD screen becomes black; when R2 is too small, the LCD screen is too bright and the font display cannot be seen.

  The RB port should be set to a weak pull-up. Use the RB port level change interrupt to find the corresponding interrupt service subroutine through table lookup. There are up to two hundred parameters to choose from, and the operation is simple and convenient.

  4 Serial and parallel interfaces of Chinese LCD display LCM12832ZK

  4.1 LCM12832ZK pins and their functions are shown in Table (1):

  4.2 Basic functions of LCM12832ZK liquid crystal display

  LCM12832ZK can display two lines, and each line can display 8 Chinese characters. Its font ROM contains 8192 Chinese fonts and 128 half-width alphabetic symbol fonts. In addition, the drawing display screen provides a drawing area GDRAM, and contains CGRAM to provide 4 sets of software-programmable dot matrix character creation functions.

  The interface between LCM12832ZK and microcontrollers such as microcontrollers is flexible. It has three modes: parallel 8-bit/4-bit and serial 3-wire/2-wire. It can also realize Chinese characters, ASCII codes and bitmaps.


  Table 1):


  Shaped same-screen display, as well as commands to move the current display screen up/down/left/right and clear the screen, cursor display/flash control commands and LCD sleep/wake/close display commands reserve multiple control lines, such as reset /Serial and parallel selection/brightness adjustment for users to use flexibly.

  4.3 Parallel/serial interface module settings

  


  4.4 Serial interface data transmission

  This design adopts serial mode, that is, the short-circuit resistor of S/P on the back of the module is on the "S" side. In serial mode, two transmission lines will be used to transmit serial data. The main control system will cooperate with the transmission synchronization clock (SCLK) and the reception serial data line (SID) to complete the serial transmission action.

  When the serial interface transmits data, the chip select CS is first set to 1. When the rising edge of clock SCLK arrives, a data is transmitted. From a complete serial transmission process, the start bit is transmitted first. It needs to receive five consecutive "1" (synchronization bit string) in the start byte group. At this time, the transmission count will be reset. Set and the serial transmission will be synchronized, and the following two BITs specify the transmission direction bit (RW) and the temporary register selection bit (RS) respectively. When RW:RS is 0:0, write the command to the LCD RAM, RW When :RS is 0:1, write data to the LCD RAM, and the last eighth bit is "0".

  After receiving the start byte, each command/data will be received in two groups: the higher 4-bit (DB7~DB4) command data will be placed in the LSB part of the first group, and the higher 4-bit command data will be placed in the LSB part of the first group. The command data of the lower 4 bits (DB3~DB0) will be placed in the LSB part of the second group, and the other four related bits are all 0, as shown in Figure 4.

5 Serial interface program design of   Chinese LCD display LCM12832ZK

  5.1 PIC16F877 microcontroller serial port settings

#DEFINE CS PORTD,7 ;CS is the chip select, it is 1 when working

#DEFINE SCLK PORTD,5 ;SCLK is the clock line, rising edge action

#DEFINE SID PORTD,6 ;SID is the data line

5.2 Initialization process of   Chinese LCD display LCM12832ZK

         ?


MOVLW .40

CALL DELAY_2

MOVLW B'00110000' ;Function setting

MOVWF DAT

CALL W_COMMOND

CALL DELY_1

MOVLW B'00110000' ;Function setting

MOVWF DAT

CALL W_COMMOND

CALL DELY_1

MOVLW B'00001100' ;Display status on/off

MOVWF DAT

CALL W_COMMOND

CALL DELY_1

MOVLW B'00000001' ;Clear display

MOVWF DAT

CALL W_COMMOND

MOVLW .10

CALL DELAY_2

MOVLW B'00000110' ;Enter point setting

MOVWF DAT

CALL W_COMMOND

  5.3 Chinese LCD display LCM12832ZK font display subroutine

  The data and instructions of the microcontroller are sent to the Chinese liquid crystal display LCM12832ZK module in a serial transmission manner, and each time 1 byte is input. During transmission, the LCM12832ZK Chinese LCD display has a fixed transmission mode. This design uses a cyclic method to transmit 24 bits at a time in the software. The specific timing is shown in Figure 4, and the implementation program is as follows:

MOVLW 0XB2; Subroutine to display the word “parameter”

MOVWF DATH; where "B2CE" is the font code of "parameter"

MOVLW 0XCE

MOVWF DATL

MOVLW B'10000000'; 80H is the display address of "parameter"

CALL DISPLAY

DISPLAY ;display general subroutines

MOVWF DAT

CALL W_COMMOND; call write command subroutine

CALL DELY_1; Call a subroutine with a delay of 100μs

BSF RWRS,0; bits 1 and 0 of RWRS are command and data judgment bits

BCF RWRS,1; bit1-bit0: 00 transmission command

MOVF DATH,W; bit1-bit0: 01 transmit data

MOVWF DAT

CALL WRITE_1; call the write data subroutine

MOVF DATL,W

MOVWF DAT

CALL WRITE_1

RETURN

  6 Conclusion

  The PIC16F877 microcontroller is used to control the LCM12832ZK Chinese LCD display and the multi-parameter keyboard input programming method. It has the characteristics of practicality, low price, small instructions, strong functions and easy to learn. The external wiring is simple and flexible, and the software modification is convenient. The LCM12832ZK Chinese LCD display used has powerful font library and graphic editing functions, and is suitable for the intelligent LCD display part of various low-voltage electrical appliances.

  references

[1] Translated by Liu Heping, et al. PIC16F87X Data Manual [M]. Beijing: Beihang University Press, 2001.6 Welcome to Wuyou Electronics Development Network (online shopping mall for online reading of technical articles)

[2] Liu Heping, et al., eds. PIC16F87X Microcontroller Practical Software and Interface Technology [M]. Beijing: Beihang University Press, 2002.3

[3]LCMXXXXZK Instruction Manual[M]. Beijing: Beijing Qingyun Innovation Technology Co., Ltd., 2003

[4]Microchip CDROM. United States: Microchip company, 2002

Reference address:Application of LCD in motor soft starter

Previous article:Implementation of CANopen protocol in servo motor control system
Next article:Design of intelligent motor protector based on DSP

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

LCD12864 Test Procedure
The controller of LCD12864 is ST7920, which has Chinese character library, graphic library and parallel port driver. #include reg52.h #include intrins.h #define uint unsigned int #define uchar unsigned char #define P0 P0 uchar code table1 ={"Wallacer"}; uchar code table2 ={"I like microcontrollers!"};  uchar
[Microcontroller]
Simplifying System Power Design for Automotive Displays
In terms of automotive displays, automakers are beginning to install more screens in the cabin, larger and clearer. Displays for advanced instrument clusters, head-up displays, infotainment systems, central displays, rear-seat entertainment systems, smart rearview mirrors and other functions can vividly display the
[Embedded]
Automotive LCD/Display Bias Solutions for Infotainment or Cluster Displays
Designing for automotive LCD displays larger than 5" can be complex. The display source driver requires a supply rail called analog voltage device drain (AVDD) in the 10V to 15V range and two supply rails for the gate driver (VGH and VGL). In many cases, you can use an LCD bias supply such as the TPS65150-Q1, an autom
[Automotive Electronics]
Automotive LCD/Display Bias Solutions for Infotainment or Cluster Displays
HT1621B LCD driver connection and program
   Recently I need to display the AD conversion data, and since I only have HT1621 at hand, I use this.    Hardware connection: The microcontroller uses the 32-pin chip stm8s103k to drive the HT1621B to display the LCD.    (1) Only three wires need to be connected between the microcontroller and the HT1621: CS, WR
[Microcontroller]
LCD device driver in Linux (5) - based on s3c6410 platform
In the previous articles, when analyzing the probe functions corresponding to the LCD platform devices, some functions were not analyzed in detail because the main purpose was to highlight the overall structure of the probe function. Now we will analyze some functions in more detail. (1), void s3cfb_pre_init(void)
[Microcontroller]
LCD device driver in Linux (5) - based on s3c6410 platform
Design of adjustable electronic calendar and clock based on 51 microcontroller using DS1302 and LCD1602
Specific function implementation: After powering on, the current year, month, day, week, hour, minute, second and other information can be displayed on the LCD1602. Press the K1 key to display the real-time clock; press the K2 key to select the year, month, day, hour, Minutes and seconds settings; press the K3 key for
[Microcontroller]
JZ2440 Development Board-TFT LCD Experiment
This experiment CPU: s3c2440 LCD: 4.3 inches Resolution 480*272 TFT-LCD Model AT043TN24 V.1 The s3c2440 LCD controller supports: ①1/2/4/8bpp palette display mode, 16bpp/24bpp non-palette display mode After the LCD model is selected, the hardware engineer makes the circuit board, and the LCD module wiring is de
[Microcontroller]
JZ2440 Development Board-TFT LCD Experiment
Power supply application for small active matrix OLED display
OLED categories and characteristics OLED screens are classified into two types: passive matrix (PMOLED) and active matrix (AMOLED). PMOLED displays are cheaper and easier to manufacture. However, the resolution and screen refresh rate are limited. Most OLED displays today use passive matrix, but active matrix d
[Power Management]
Latest Industrial Control 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号