OLED display implementation based on C8051F023 microcontroller

Publisher:JoyfulJourneyLatest update time:2011-07-02 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

Organic electroluminescent display, also known as organic light emitting diode (OLED) or organic light emitting display (OLED), has obvious advantages over the popular liquid crystal display (LCD) on the market, mainly manifested in: self-luminescence (no backlight is required), no viewing angle problem (viewing angle can reach more than 170°), light weight, thin thickness, high brightness, high luminous efficiency, fast response speed (1000 times that of liquid crystal), high dynamic picture quality, wide temperature range (temperature range -40℃~80℃), low power consumption, strong earthquake resistance, low manufacturing cost, and flexible display. It is especially suitable for the instrument industry that requires high brightness, as well as military products with higher conditions. Compared with LCD, which has been mature in all aspects, the development of OLED is still in its early stages, but with the gradual realization of the above advantages, OLED will most likely replace LCD in the market. OLED is recognized by the industry as the next generation display with the most development prospects.

2 Hardware Structure Design

This paper uses the single-chip microcomputer C8051F023 as the control core device of 128×64 monochrome OLED, and adopts a screen VGG12864G from Visionox. It uses the SSD1303 from Solomon as a dedicated driver IC. It realizes the dynamic and static display of text and images. The overall hardware design structure diagram is shown in Figure 1.

Figure 1 Hardware design structure diagram

2.1 SSD1303 driver and interface circuit

The OLED display screen of the VGG12864G module has a 128-column and 64-row structure. Figure 2 is a block diagram of the SSD1303 structure, showing the block diagram of the module logic circuit and interface circuit. The user only needs to provide power to the interface, generate a drive command signal and a display data signal to light up the OLED screen. As can be seen from the figure, the output of the row and column drivers is bonded to the OLED screen through the FPC, and the remaining MCU interface, voltage and current controllers need to be specially designed interfaces and drive circuits, and the external signals of the module are only related to the SSD1303. Therefore, if you understand the input characteristics and instruction system of the SSD1303, you can use this module conveniently.

SSD1303 is an IC for driving monochrome OLED launched by Solomon Corporation, which adopts TAB package. This driver IC based on CMOS process integrates row and column drivers, oscillators, contrast controllers and graphic data memory (GDDRAM), which greatly reduces peripheral devices and power consumption. The maximum resolution supported is 132×64, of which the 132×16 dot matrix area at the bottom of the OLED screen can display 4 local colors and can be programmed to achieve 64 gray levels. When used for monochrome display, 256 levels of contrast can be programmably controlled. Depending on the microprocessor (MPU) used, it provides three communication interface modes: 8-bit 6800 series MPU parallel, 8-bit 8080 series MPU parallel and Serial Peripheral InteRFace (SPI) serial.

The control command is input to the control command decoder through the MCU interface for command decoding, and then the clock, line synchronization, and field synchronization signals are output to control the oscillation frequency of the OLED display, the voltage conversion module of the display device, and the driving module of the row and column offset of the OLED display content; if it is display data (128×64bits), then the display data is input to the GDDRAM cache by the control circuit through the MCU interface, and then the data is decoded by the local color decoder, and finally the decoded display data is driven by the row and column driver to drive the OLED display, presenting a stable display effect on the OLED.

2.2 Power Supply Design

The hardware structure design block diagram is shown in Figure 2. The DC-DC converter of the external hardware circuit uses the TPS7333 chip to convert the 5V power supply into a 3.3V power supply, and the output power signal controls the voltage and current of the entire SSD1303 through the voltage and current controller. The entire system requires 3.3V and 12V power supplies, the MCU (C8051F023 is used in this article) needs to provide a 3.3V power supply voltage, and the OLED needs a 3.3V logic power supply voltage and a 9-12V drive power supply voltage, which is provided by the external power converter circuit.

2.3 Various control signals

Then, how to use MCU to control. MCU controls SSD1303 driver IC through RES#, CS#, D/C, WR#, RD# and D0~D7, a total of 13 interfaces, thereby controlling the OLED display. CS# is the chip select signal. When CS# is connected to a low level, MCU can communicate with the driver IC; RES# is the reset enable terminal. When it is connected to a low level, all control registers are set to the factory default state, and the image register is cleared; D/C is the data/command selection signal; WR# and RD# are write and read selection signals respectively. When CS# is low, reading and writing are valid on its falling edge. By changing the high and low of the three interfaces of D/C, WR# and RD#, the microcontroller has four states of control over OLED, which can be shown in Table 1.

[page]

2.4 Timing of reading and writing

As long as you read and write according to the timing waveform of VGG12864G, you can complete the display of OLED. However, if you use software programming to spell the timing, you need to consider many time parameters, which is somewhat difficult. In order to make data and commands easier to read and write, we use another method. As shown in Figure 1, connect WR# and RD# to /WR and /RD of C8051F023, that is, P0.7 and P0.6. When programming in C language, define the pointer type as xdata type, which points to the off-chip memory. By assigning a value to the pointer, the off-chip data storage area is accessed. When accessing the off-chip memory, /RD and /WR will automatically become low during reading and writing. At the same time, the P3 port is the data bus. In the non-multiplexed mode, the high 8 bits of the address bus use the P1 port, and the low 8 bits use the P2 port; in the multiplexed mode, the high 8 bits of the address bus still use the P1 port, and the low 8 bits and the data bus multiplex the P3 port, and the P2 port will not be affected. Therefore, it is best to set it to multiplexing mode (EMIOCF.4=0), so that port P2 can be used as another output port to freely control RES#, CS#, and DC. Although the address bus is not required, the address line will be used when accessing the off-chip memory, so it should still be avoided. The timing waveform of the experimental results is shown in Figure 3. As long as CS# is low, writing (reading) data or commands on the falling edge of WR# (RD#) can effectively complete the reading and writing work.


3 Software Program Design

The entire MCU-controlled OLED display program is written in C language, and the main program flow chart is shown in Figure 4. MCU initialization includes turning off the watchdog, clock initialization, port initialization, and timer and interrupt initialization. OLED initialization includes turning on the display, setting the display mode, setting the contrast controller, contrast setting (1-256), setting the row and column start address, setting the specific position color, and setting the serial port pin configuration. Clearing the OLED screen and OLED display both write data to GDDRAM, including reading status, writing commands, and writing data subroutines. Clearing the OLED screen writes all "0", and the OLED display only needs to write the character code of the text or picture to be displayed. Before each write (command or data), the status must be read to see if the highest bit D7 is "0", which is also called "busy" detection. If it is "1", it means "busy"; otherwise, it is "idle". The write operation can only be performed in the "idle" state.

4 Display of text and images

VGG12864G has a built-in 128×64 bits display memory for storing display data. Figure 5 shows the address structure of the RAM. The RAM capacity is 128×64=8192 bits, which is divided into 8 pages (page0-page7), with 8 rows per page. The first column of each page is exactly one byte, with the low bit at the top and the high bit at the bottom. The display state of each pixel on the display screen corresponds to each bit of binary data in the display memory. The data in the display memory is directly used as the driving signal for the graphic display. When the data is displayed as "1", the corresponding pixel is displayed; when the data is displayed as "0", the corresponding pixel is not displayed.

The character library of the displayed text or picture needs to be created by yourself, but it is almost impossible to do it manually. You can use the font extraction software - "Font Extraction V2.2", which provides two modes of module extraction: horizontal and vertical. Then, according to the RAM address structure of the OLED display data, select the vertical mode of module extraction. Since the byte structure of the OLED module is high at the bottom and low at the top, it should be set to byte reverse order. The font, shape, size and display effect (underline and strikethrough) of the character can be adjusted as needed, and then the C51 format (A51 format if programming in assembly language) is used to generate the dot matrix display code of a single character. Finally, according to the display effect on the OLED screen, the code can be adjusted accordingly to obtain the required character library.

[page]

Generate the required character library according to the text or picture to be displayed, write the character code into the GDDRAM module of SSD1303 through the OLED display program, and then it can be stably displayed. Dynamic display of pictures can also be achieved through software programming, as shown in Figure 6, which shows the text and picture display completed by the system.


Figure 6 Character display

5 Conclusion

A method for realizing OLED display based on single-chip microcomputer is designed. According to its functions and characteristics, the circuit design of related parts is solved, and the display of text, dynamic and static pictures is realized on the developed system. Experiments show that the designed circuit is simple, which greatly reduces the cost of the system and enables the system to be applied to small equipment.

Reference address:OLED display implementation based on C8051F023 microcontroller

Previous article:Wireless identification device system based on 51 single chip microcomputer
Next article:Design of Taxi Meter System Based on AT89S51 Single Chip Microcomputer

Recommended ReadingLatest update time:2024-11-16 15:22

Rumor has it that BOE will become the OLED panel supplier for the 5G iPhone
On June 4, Digitaltimes reported that sources said that in addition to Samsung Display and LG Display, Chinese panel maker BOE will also become an OLED panel supplier for Apple's 5G iPhone. Regarding this news, an investor specifically asked BOE, "Apple also plans to let BOE supply OLED screens for some of its iPhone
[Mobile phone portable]
What is CCFL? What is OLED?
CCFL cold cathode lamp is a new type of lighting source; CCFL lamp tube has the advantages of small tube, simple structure, small temperature rise on the surface of the lamp tube, high brightness on the surface of the lamp tube, easy processing into various shapes (straight tube, L-shaped, U-shaped, ring-shaped, et
[Power Management]
What is CCFL? What is OLED?
Design of control circuit for OLED matrix display screen
1. Introduction         Organic electroluminescent display (OLED) technology is the next generation of the most competitive flat panel display technology. At present, the research focus of OLED is to improve the stability of the device, the luminous efficiency and the driving technology of high-quality dynamic displa
[Microcontroller]
Design of control circuit for OLED matrix display screen
TCL Technology plans to invest 35 billion yuan to build Guangzhou Huaxing's 8.5th-generation rollable printed OLED/QLED production line
 On April 9, TCL Technology announced that the company and its holding subsidiary TCL Huaxing Optoelectronics Technology Co., Ltd. ("TCL Huaxing") intend to sign the "Guangzhou Huaxing 8.5th Generation Rollable Printed OLED/QLED Display Panel Production Line and Guangzhou Huaxing 8.6th Generation Oxide Semiconductor N
[Mobile phone portable]
Design of distributed multi-screen electronic bulletin system based on USB and OLED
Design of distributed multi-screen electronic bulletin system based on USB and OLED introduction The new generation of display devices, organic electroluminescent display devices OLED (Organic Light Emitting Diode), are 1/3 of the thickness of LCD, and the response speed is 1,000 times that
[Analog Electronics]
Design of distributed multi-screen electronic bulletin system based on USB and OLED
OLED true color display design based on FPGA
Using FPGA control module, the OLED true color dynamic image drive control circuit is designed. The method of using FPGA to realize OLED peripheral control circuit and 256-level grayscale is introduced, and the role of the module in the circuit and the working process of the whole circuit are analyzed. The circuit syst
[Power Management]
OLED true color display design based on FPGA
Xiaomi redefines OLED TV by selling it in the high-end market for 16,999 yuan
This year's OLED TV market is very lively. In the first half of the year, LG, Skyworth, and Sony successively released new products. Now Xiaomi is also joining the battle. After launching a number of high-end products such as the Xiaomi TV Master Series and Xiaomi TV 6 Ultra Edition, Xiaomi seems to want to change its
[Embedded]
Xiaomi redefines OLED TV by selling it in the high-end market for 16,999 yuan
Introduction to OLED Display Technology
To understand how and why OLED power supply affects display image quality, you must first understand OLED display technology and power supply requirements. This article will explain the latest OLED display technology and explore the main power supply requirements and solutions. It will also introduce innovative powe
[Power Management]
Introduction to OLED Display Technology
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号