LCD display system designed with C8051F021 and RA8835

Publisher:EuphoricMelodyLatest update time:2011-09-27 Keywords:C8051F02  RA8835 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
This paper presents a low-cost LCD display solution based on C8051F021 and RA8835. With the continuous development of electronic product design technology, the design of electronic products, especially the design of human-computer interaction interface, is becoming more and more humanized. Among them, LCD screens are widely used because of their advantages such as being able to display complex text and graphics, arbitrary display area, low power consumption, and thinness. In recent years, with the rapid development of single-chip microcomputer technology, a variety of single-chip microcomputers with excellent performance and very low cost have emerged. C8051F series single-chip microcomputers are one of them. In engineering applications, C8051F021 can reduce waste and reduce costs while meeting performance requirements.

1 Main components of the system

1.1 C8051F021 single-chip microcomputer

This system uses the SOC single-chip microcomputer C8051F021 with excellent performance and low cost as the control core. C8051F201 is a fully integrated mixed-signal system-level MCU chip with 32 digital I/O pins. Its main internal resources include 8-channel 12-bit ADC, 2-channel 12-bit DAC, 4 KB RAM, 64 KB FLASH, as well as hardware-implemented SPI, SMBus/I2C and two UART serial interfaces, in addition to clock oscillators, watchdog timers, VDD monitors, temperature sensors, etc.; all analog and digital peripherals of C8051F021 can be enabled/disabled and configured by IDE software. It uses the CIP-51 microcontroller core compatible with 8051. Due to the pipeline structure, its instruction execution speed has been greatly improved. In addition, C8051F021 is also equipped with a standard JTAG interface, which can be used to perform non-intrusive, full-speed, in-system debugging of the MCU installed in the final product with the support of IDE software. The package of C8051F021 is TQFP-64, which can work with a voltage of 2.7 to 3.6 V in the industrial temperature range (-45℃ to +85℃).

1.2 RA8835 LCD controller chip

RA8835 is a new version of LCD controller chip launched by Taiwan Ruiyou Technology Co., Ltd. It contains powerful I/O buffer. RA8835 has rich instruction functions and uses four-bit data parallel transmission. It can support mixed display of text and graphics, and can present dynamic effects such as three-layer overlapping display of text and graphics, horizontal and vertical scrolling on the LCD screen. RA8835 can support a screen display resolution of up to 640×256. It has an internal integrated Mask ROM that can support 160 5×7 pixel characters, and can also be connected to CGRAM to support 64 8x16 pixel characters, or external CGROM to support 256 8×16 pixel characters. RA8835 is fully compatible with EPSON's S1D13305 (SED1335) chip, and has enhanced stability. It has the advantages of newer process and lower power consumption, which can effectively reduce costs.

The interface of RA8835 has a powerful I/O buffer, which is mainly manifested in two aspects:

first, MCU does not need to judge whether RA8835 is "busy" when accessing it. RA8835 is ready to accept the access of MCU at any time, and can timely transmit the instructions and data sent by MCU under the internal timing;

second, RA8835 has two operation timing circuits adapted to Intel 18080 series MCU and M6800 series MCU in the interface part, and one of them can be selected by setting the pin level. The pins of the RA8835 interface are as follows:

DB0~DB7: tri-state data bus, which can be directly connected to the data bus of the MCU;

CS: chip select signal, low level is valid, and it should be set low when MCUI accesses RA8835;

RD: When it is an 8080 interface, this pin is a read operation signal;

when it is an M6800 interface, it is an enable signal;

WR: When it is an 8080 interface, this pin is a write operation signal;

when it is an M6800 interface, it is a write operation signal;

A0: I/O buffer selection signal, when A0 is 0, write data parameters and read busy flag, when A0 is 1, write instruction code and read data;

RES: reset signal, low level is valid, when restarting RA8835, it is also necessary to use the instruction SYSTEMSET.

SEL1, SEL2: type selection signal of the interface.

2 LCD screen circuit design

This system uses the MST-G320240DBSW-213W-E type 5.7-inch LCD display module produced by Hong Kong Truly Corporation. The dot matrix that can be displayed is 320x240, with blue film highlight, LED backlight, onboard 5 V negative voltage, and RA8835 control chip. Its LCD screen interface circuit is shown in Figure 1.

LCD screen interface circuit

In Figure 1, AD0~AD7 can be directly connected to the data/address bus of C8051F021 (with 5 V pull-up, the I/O pins of C8051F021 are all 5 V voltage resistant); RD and WR are read and write lines, respectively, which can be connected to the read and write ports of C8051F021 (RD: pin 49, WR: pin 48; both with 5 V pull-up); RST is power-on reset, which can be connected to the power-on reset circuit; CS-LCD is chip select input; A0 is I/O buffer selection. In order to avoid the LCD backlight being always on when there is no operation, reduce system power consumption, and extend the service life of the LCD, this system uses the 555 circuit to design a LCD backlight control circuit with a fixed delay to turn off the backlight. This circuit uses LM555H to build a monostable circuit. When there is a trigger pulse at the BLC end connected to the C8051F021 I/O port, the output end TC of the 555 monostable circuit will output a high-level pulse of a certain length. At this time, the T1 tube is turned on, and the LCD backlight is turned on. After a fixed delay, the 555 output end TC turns to a low level, the T1 tube is turned off, and the LCD backlight is turned off. According to the calculation formula of the output pulse width of the 555 monostable circuit, the appropriate component parameters can be selected. Usually when the delay is set to 30 seconds, the resistor R7 can be selected as 100 kΩ and the capacitor C21 can be selected as 330μF. In engineering projects, sometimes due to actual needs, the system also needs to expand the real-time clock chip DS12887 and the memory chip CAT28C256. The interface of these two and the LCD interface can share the data/address bus of C8051F021 as the data bus. The chip select circuit with 74HC139 as the core given in this design is shown in Figure 2, and the corresponding addresses are as follows:

LCD: 2000H~2001H

DS12887: 4000H~40FFH

CAT28C256: 8000H~FFFFH

Chip select circuit based on 74HC139

The CAT28C256 in this system occupies A0~A14 address bus alone, and A15, A14, and A13 are used as the decoding input signal lines of 74HC139, and A0 is used as the I/O buffer selection of the LCD. Due to the use of external MEM low port multiplexing, this system also designs an address latch circuit with 74HC573 as the core, and its circuit is shown in Figure 3. Among them, AD0~AD7 can be connected to the data/address bus of C8051F021, and ALE can be connected to the ALE terminal (pin 50) of C8051F021.

Address latch circuit

3 System software design

When designing software, the driver of RA8835 can be designed according to the internal registers of RA8835. The control part of RA8835 is the core of RA8835. It consists of oscillator, functional logic circuit, display RA management circuit, character library management circuit and timing generator for generating driving timing. Its oscillator can work in the range of 1 to 10 MHz. RA8835 can quickly interpret the instruction code sent by MCU at a very high working frequency, put the parameters into the corresponding registers, and trigger the corresponding logic function circuit. The control part can manage 64 KB display RAM, built-in character generator and external character generator CGRAM or EXCGROM. Generally, RA8835 can divide 64 KB display RAM into the following two display characteristic areas:

(1) Text display characteristic area

The display RAM area with this characteristic is dedicated to text display. Each byte of data accessed in this area is considered as a character code. RA8835 can use the character code to determine the location of the character in the character library, and then transmit the corresponding font data to the LCD display module, and the 8x8 dot matrix block of the character appears on the LCD screen, that is, one byte of the text display RAM area corresponds to the 8x8 dot matrix on the LCD screen.

(2) Graphic display characteristic area

The display RAM area with this characteristic is dedicated to graphic display. Each byte of data accessed in this area will be directly sent to the LCD display module. The level state of each bit determines the display state of a point on the LCD screen. "1" is display, and "0" is not display. Therefore, one byte of the graphic display RAM area corresponds to the 8×1 dot matrix on the LCD screen.

There is a set of special registers in RA8835 to manage these two characteristic display areas. It can display one characteristic area separately, or it can make two characteristic display areas display together through a certain logical relationship. The display mode setting can be realized through software command setting. RA8835 has 13 instructions, most of which have parameters. The parameter values ​​can be set by the user according to the characteristics of the controlled LCD display module and the display needs.

MCU can write instruction code into instruction input buffer (i.e. when A0=1), and the instruction parameters are then written into data input buffer (i.e. when A0=0). One of the functions of instruction code with parameters is to select the register of corresponding parameters. Any instruction (except SLEEPIN, CSRDIR, CSRR and MERAD) can be executed only after the input of its attached parameters is completed. When writing a new instruction, RA8835 generally waits for the arrival of new parameters after the old instruction parameter group is completed.

The timing of RA8835 in 8080 mode is shown in Figure 4. Figure 5 shows the driver program flow chart of RA8835.

RA8835 timing in 8080 mode

RA8835 driver flow chart

System display effect diagram

4 Conclusion

This paper discusses the design method of LCD display system based on C8051F021 microcontroller and RA8835 LCD controller. The specific interface circuit for effective control of the module is given. The system has been proved to have stable performance and simple design through engineering tests, and it can also provide a reference method for the design of related LCD display systems.
Keywords:C8051F02  RA8835 Reference address:LCD display system designed with C8051F021 and RA8835

Previous article:Design of Telephone Alarm System Based on Single Chip Microcomputer
Next article:LCD touch screen technology and application designed with C8051F023

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号