Design of LCD driver based on MicroBlaze soft core

Publisher:化羽2015Latest update time:2010-01-22 Source: 张开锋 肖山竹 陆静芳Keywords:MicroBlaze Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 MicroBlaze Architecture

MicroBlaze uses a powerful 32-bit pipeline structure, including 32 32-bit general registers and an optional 32-bit shifter, with a clock frequency of up to 150 MHz; it runs at a speed of up to 120 DMIPS on a Virtex-4 FPGA and only occupies 950 logic cells in a Virtex-II Pro FPGA. The block diagram of the MicroBlaze soft core is shown in Figure 1. It has the following basic features:

①32 32-bit general registers and 2 special registers (program counter and status flag register).

②32-bit instruction system, supporting 3 operands and 2 addressing modes.

③ Separate 32-bit instruction and data buses, compliant with IBM's OPB bus specification (a low-speed bus connected to peripherals).

④ Directly access the on-chip block memory (BRAM) through the local memory bus (LMB, local high-speed bus).

⑤ It has high-speed instruction and data cache and three-level pipeline structure (addressing, decoding, and execution).

⑥Has hardware debugging module (MDM).

⑦With 8 input and 8 output fast link interfaces (FSL).

MicroBlaze soft core block diagram

The interface signals in the figure are described as follows:

①DOPB, the peripheral device data interface bus inside the device, is used for data exchange between the processor and the devices on the chip.

②DLMB, local block memory bus for data exchange. This bus provides a dedicated high-speed data exchange channel between the processor core and the block memory (BRAM).

③IOPB, used to implement the bus interface of the external program memory. When the program is large, a large-capacity external memory is required. This bus provides a channel for reading instructions.

④ILMB, local memory bus for instruction fetching. This bus is connected to the block memory (BRAM) inside the device to achieve high-speed instruction fetching.

⑤MFSLO~7, master device data interface, providing point-to-point communication channel.

⑥SFSLO~7, slave device data interface, provides point-to-point communication channel.

2 MicroBlaze Embedded Development Tool EDK

Xilinx provides a complete embedded development tool EDK (Em-bedded Development Kit). EDK is a SOPC (System On Programmable Chip) system development kit launched by Xilinx in 2003. The kit integrates a wealth of development tools and a large number of IP core resources, including hardware platform generator (PlatGen), hardware simulation model generator (SimGen), hardware debugging tool (XMD), software library generator (LibGen), application software compilation tool (GNU Compilers), software debugging tool (GNU Debuggers), etc.; IP core resources include LMB and OPB bus interfaces, external memory controller (EMC), SDRAM controller, UART interface, interrupt controller, timer, etc. All these tools and resources are managed by an integrated development environment called Platform Studio XPS (Xilinx Platform Studio) in EDK. XPS provides a friendly graphical user interface (GUI) and is very easy to use. The design process is shown in Figure 2.

Design Process [page]

3 LCD display module

The MPG240128 LCD module is a graphic dot matrix LCD that can display not only numbers, characters, but also Chinese characters and arbitrary graphics. The control chip of this module is T6963C, and the connection with the outside is only 8-bit data lines, 6 control lines and power supply. The LCD module pin description is listed in Table 1. MCtJ can realize the display control of the module by reading and writing these data lines and control lines according to the corresponding timing.

LCD module pin description

4 Interface between Microblaze and LCD module

Since the LCD module used in this article already has a display control chip T6963C, the peripheral circuit of the LCD module is relatively simple, and only the interface circuit with MicroBlaze needs to be considered. This design uses GPIO to simulate the timing of the LCD module to realize the display control of the LCD module. The interface circuit between MicroBlaze and the LCD module is shown in Figure 3.

Interface circuit between MicroBlaze and LCD module

Perform system hardware design in the XPS integrated development environment of the EDK development kit. In its interface environment, add the required IP cores, connect the system and set various parameters. Use the platform generator to generate the netlist file (.NGC) of the embedded system submodule based on the hardware description file (.MHS file), and then call Xilinx's synthesis tool XST for synthesis, thus forming the hardware model of the entire application system. [page]

This design uses GPIO to control the LCD module. EDK provides a series of API functions, which can be used to easily operate GPIO. The following are two functions:

program

Among them, InstancePtr is a pointer pointing to the base address of the GPIO to be controlled; Channel is the channel value, which can be 0 or 1. These two functions only affect the bits whose corresponding bits in Mask are 1. For example, XGpio_DiscreteSet(&lcd240128, 1, 0x00000001) sets LCl3240128_pin to 1 without affecting other bits; similarly, XGpio_DiscreteClear(&1cd240128, 1, 0x00000001) sets LCD240128_pin<0> to 0 without affecting other bits. In order to enhance the readability of the program, 8 macro definitions are added: #define wr_high()XGpio_DiscreteSet(&lcd240128,1,0x00000800), #define wr_low()XGpio_DiscreteClear(&1cd240128,1,0x00000800), and the other 6 macro definitions can be deduced in the same way. With these two functions, it is very convenient to write write command and write data functions. The following is a brief introduction to these two functions:

program

program [page]

The graphics and characters displayed by LCD are composed of dot matrix, so displaying a pixel on LCD is the basis of displaying graphics and characters. The single pixel display function is introduced as follows:

program

With the single pixel display function, it is very convenient to write character display function and graphic display function. Due to space limitations, we will not introduce them here.

Conclusion

This design has been verified on Xilinx Spatan3 Starter Board and achieved good results. Through the implementation of this design, it can be seen that MicroBlaze is a powerful and flexible embedded soft processor, especially its powerful user-defined logic function, which greatly facilitates system design. It can be foreseen that the SOPC development method based on embedded soft processor will have broad application prospects.

Keywords:MicroBlaze Reference address:Design of LCD driver based on MicroBlaze soft core

Previous article:Design and implementation of DDS chip based on model
Next article:Design of ARINC429 bus interface module based on USB

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

Design of LCD segment driver driven by PIC microcontroller
A typical digital interface for a 4×4 keypad uses 8 digital I/O pins. But using 8 pins as digital I/O takes up the number of segment driver pins that can be used to connect to the LCD. By using 2 digital I/O pins and 2 analog input pins, a 4×4 keypad can be added to a PIC microcontroller without sacrificing any of i
[Microcontroller]
Design of LCD segment driver driven by PIC microcontroller
S3C2440 bare metal experiment (7) ---- LCD driver
LCD is actually quite simple as long as you understand the timing. Now the LCD driver under LINUX has good support for processors like Samsung. You only need to modify some parameters. If it is a chip-level driver, it is more complicated, mainly involving Framebuffer, which will make people crazy. After completing the
[Microcontroller]
Latest Embedded 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号