Abstract: The article introduces the characteristics and working principle of the built-in SED1520 graphic liquid crystal display module MGLS-12032, gives the interface circuit between MGLS-12032 and 8031 microcontroller, introduces the instruction set of SED1520, and gives the display module's instructions with specific examples. Related procedures.
Keywords: Graphic display LCD microcontroller SED1520 MGLS-12032
1 SED1520 features
SED1520 is an LCD control driver that integrates row and column drivers and controllers. It can be widely used in small-scale LCD modules, such as MGLS-12032 and MGLS10032 of Hong Kong Jingdian Company.
The SED1520 LCD driver has the following characteristics:
●Built-in display RAM area, RAM capacity is 2560 bits. The 1-bit data in RAM controls the on-off state of a point on the LCD screen: "1 means on", "0" means off.
●Has 16 row driver ports and 61 column driver ports.
●Can be directly connected to 80 series or 68 series microprocessors.
●The driving duty cycle is 1/16 or 1/32.
●Can be used in conjunction with SED1520 to expand the number of column driver ports.
1.1 Main parameters of SED1520
The main electrical parameters of SED1500 are listed in Table 1.
Table 1 Main parameters of SED1520
Parameters | symbol | scope | unit |
Supply voltage 1 | Vss | -8.0~0.3 | V |
Supply voltage 2 | V5 | 16.5~0.3 | V |
Supply voltage 3 | V1-V4 | V5-0.3 | V |
Input voltage | V I | Vss-0.3~0.3 | V |
The output voltage | Vo | Vss-0.3~0.3 | V |
Power consumption | PD | 250 | mW |
Table 2 Timing characteristic parameters of SED1520
Parameters | symbol | minimum value | maximum value |
Address retention time | TAH8 | 10 | - |
Address creation time | TAW8 | 20 | - |
System cycle time | TCYC8 | 1000 | - |
Control pulse width | TCC | 200 | - |
Data creation time (R) | TDS8 | 80 | - |
Data retention time (R) | TDH8 | 10 | - |
Data creation time (W) | TACC8 | - | 90 |
Data retention time (W) | TOH8 | 10 | 60 |
1.2 Read/write operation timing of SED1500
SED1520 has two read/write operation timings, corresponding to the 6800 series and 8080 series MPU respectively. Figure 1 shows the read/write operation timing of the 8080 series MPU. The data is written or read on the falling edge of WR or RD. Listed in Table 2 are the timing characteristic parameters of SEWD1520. The unit of parameters in the table is ns.
1.3 Command system of SED1520
●Read status word
When the SED1520 is in the "busy" state, except for the read status command, other commands have no effect. Therefore, when accessing the SED1520, the status must be read first to determine whether it is "busy". The format of read status is as follows:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
1 | 0 | BUSY | ADC | OFF/ON | REST | 0 | 0 | 0 | 0 |
●Reset
This command is a software reset command. After executing this command, the display starting line is set to row 0, the column address is set to 0, and the page address is set to 3. Its reset format is as follows:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
●Display start line setting
This command sets the line number in the display RAM corresponding to the first line on the display. Modify the line number regularly to achieve the scrolling function.
The format is as follows:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
0 | 0 | 1 | 1 | 0 | Show starting line | (0~31) |
●ADC selection command
This command is used to set the connection method between the column driver output terminal and the column driver line of the LCD screen. Generally set to ADC=0. The format of this command is as follows:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1/0 |
●Display on/off command
The following is the format for displaying the on/off command:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1/0 |
Among them, D0=1 means on display; D0=1 means off display.
This command does not affect the display of RAM contents.
●Setting page address
The setting format of the page address is as follows:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | Page address (0~3) |
●Set column address
Under normal circumstances, the display RAM is divided into four pages, each page is 80 bytes. When the page address and column address are set, the only unit in the display RAM can be determined. Each data bit of the unit from low to high corresponds to the display 8 rows of data bits in a column on the screen. The column address setting format is as follows:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
0 | 0 | 1 | Column address (0~79) |
●Duty cycle selection
When selecting the duty cycle, if D0=0, the selected duty cycle is 1/16, and D0=1 is 1/32. When driving a 32-line LCD, D0 should be set to 1; when driving a 16-line LCD, D0 should be set to 0.
●Write data
The writing data format is as follows:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
0 | 1 | Display Data |
●Read data
The format of reading data is as follows:
R/W | A0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
1 | 1 | Display Data |
2 Structural characteristics of LCD module
MGLS12032 is a 120×32 dot matrix module driven by SED1520. Both SED1520 use 60 column driver ports (SEG0-SEG59). Table 3 lists the interface ports and pins of MGLS12032. Figure 2 shows the internal logic circuit diagram of MGLS12032.
Table 3 MGLS12032 interface port number and pins
Serial number | Pin name | Serial number | Pin name |
1 | GND | 9 | DB0 |
2 | VCC | 10 | DB1 |
3 | V0 | 11 | DB2 |
4 | A0 | 12 | DB3 |
5 | R/W | 13 | DB4 |
6 | E1 | 14 | DB5 |
7 | E2 | 15 | DB6 |
8 | NC | 16 | DB7 |
3 MGLS12032 interface circuit design
This system uses MGLS-12032 LCD module and SED1520 LCD driver to directly connect to the 8-bit microprocessor, which is simple and convenient to use. The interface circuit between the liquid crystal display module MGLS12032 and the microcontroller is shown in Figure 3. Among them, D0~D7 are connected to the data lines of the microcontroller. The liquid crystal display is selected through A15 and A14. A14 and A15 are connected by the microcontroller through the 74LS138 decoder. RD and WR are connected to the RD and WR of the microcontroller.
4 character display
SED1520 shows that RAM is written in the form of one row and eight columns. The required font data format is shown in Figure 4. The font pattern that constitutes the word "6" is the following 8 bytes: 00H 00H 00H 0FFH 91H 91H 91H 0F3H .
The above eight bytes are all with the bottom bit as the MSB and the top bit as the LSB, which is required by SED1520 to establish the font.
The RAM in SED1520 has a total of 32 lines, divided into 4 pages, with 8 lines per page, so that one line of characters can be written on each page, and a total of 4 lines of characters can be written. One page of RAM has 80 bytes, while the MGLS12032 uses 60 bytes. If the display area is divided according to 8×8 dot matrix characters, the display screen of MGLS12032 can be divided into 15×4 character blocks, in which the eighth character of each line occupies four on SED1520 (1) and SED1520 (2). Bytes, and the program controls the conversion of the two chip RAM areas.
This tester uses 16×16 dot matrix Chinese characters. The LCD display needs to send 32 bytes to display a 16×16 dot matrix, so it must be sent to the opposite columns in the two buffers. The system sets the Chinese character display to two pages, and the number of character blocks written in each page is 16. When the 16 character blocks are written, it will go to the next page to write the remaining 16 character blocks. Chinese character display also has the problem of processing the intermediate joint, and its processing method is basically the same as that of character type. That is, the MGLS12032 screen is divided into 7×2 Chinese character blocks.
Figure 5 shows the structural distribution diagram of the MGLS12032 LCD display. The fourth Chinese character in each line occupies 12 bytes in SED1520 (1) and four bytes in SED1520 (2). The RAM areas of the two chips must be converted during programming.
5 Chinese character font extraction and display program
By compiling a simple C program (the program is omitted), the Chinese character array format that can be extracted from the computer's Chinese character library is exactly 90 degrees different from the RAM format of SED1520. Therefore, when extracting Chinese character fonts, they must be rotated 90 degrees before the normal format can be displayed on the monitor. Since the MGLS12032 display screen is divided into two pages, SED1520 (1) and SED1520 (2), there should be two display programs. The two programs are the same except for the relevant addresses. The display subroutine of SED1520(1) is as follows:
(1) Write instruction code subroutine
PRO:PUSH DPL
PUSH DPH
MOV DPTR, #SRADD1; Set read status word address
PR01: MOVX A, @DPTR; read status word
JB ACC.7, PR01; Is the busy flag 0?
MOV DPTR, #SWADD1; Set the write instruction code address
MOV A, COM; fetch instruction address
MOVX @DPTR, A; write instruction address
POP DPH
POP DPL
RET
(2) Write display data subroutine
PR1: PUSH DPL
PUSH DPH
MOV DPTR, #CRADD1: Set read status address
PR11: MOVX A, @DPTR; read status word
JB ACC.7, PR11; Is the busy flag 0?
MOV DPTR, #DWADD1; Set the write display data address
MOV A, DAT; get data
MOVX @DPTR,A; write data
POP DPH
POP DPL
RET
(3) Read display data subroutine
PR2: PUSH DPL
PUSH DPH
MOV DPTR, #SRADD1; Set read status word address
PR21: MOVX A, @DPTR; read status word
JB ACC.7, PR21; Is the busy flag 0?
MOV DPTR, #DRADD1; Set the read display data address
MOVX A, @DPTR; read data
MOV A, DAT; store data
POP DPH
POP DPL
RET
(4) Initialization program
INT: MOV COM, #0E2H; reset
LCALL PR0
LCALL PR3; write instruction code of SED1520(2)
MOV COM, #0A4H; close wait state
LCALL PR0
LCALL PR3
MOV COM, #0A9H; Set 1/32 duty cycle
LCALL PR0
LCALL PR3
MOV COM, #0A0H; Forward sorting setting
LCALL PR0
LCALL PR3
MOV COM, #0C0H; Set the first line of the display starting line
LCALL PR0
LCALL PR3
MOV COM, #0AFH; turn on display settings
LCALL PR0
LCALL PR3
6 Application examples
MGLS12032 can be widely used in various test instruments and instruments. Figure 6 is a block diagram used in a radar angle tracking amplitude and frequency tester. Its main purpose is to guide the test steps and display the working status of the radar and the final test results in real time.
Previous article:Design of a LD-pumped solid-state laser power supply
Next article:Superconducting detector technology and development
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The download and win gift event is here again~you can learn and win prizes at the same time!
- Why is it said that the larger the ceramic capacitor package, the better the frequency characteristics?
- The smartwatch craze has left the survivors
- [TI recommended course] #Boost and buck-boost DCDC converters help wireless charging design#
- Milliohm meter based on [EVAL-ADICUP360] - Programming
- USB to TTL serial port debugging tool based on 2.4G wireless transmission
- When the epidemic in Shanghai is over, I plan to develop in other cities.
- [Technical Live Broadcast] Experts from MPS, Nexperia, and Tektronix gathered to discuss the key points of new energy vehicle power design
- Dogecoin suddenly became popular. Here is a tutorial on graphics card mining
- The difference between power module ripple and noise