MCS-51 Single Chip Microcomputer and FPGA

Publisher:快乐球球Latest update time:2011-05-24 Keywords:MCS-51  FPGA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Interface between MCU and FPGA

There are generally two ways to interface a single-chip microcomputer with an FPGA, namely the bus method and the independent method. The MCS-51 single-chip microcomputer has a strong external bus expansion capability. It is easy to realize the bus interface between the single-chip microcomputer and the FPGA using the three-bus structure outside the chip. In addition, the single-chip microcomputer has many advantages in communicating data and control information with the FPGA in bus mode: fast speed; saving the I/O port lines of the PLD chip; compared with the non-bus method, the single-chip microcomputer is easy to program and the control is reliable; through logical switching in the FPGA, the single-chip microcomputer is easy to interface with SRAM or ROM.

In the logic design of the communication between the microcontroller and the FPGA in bus mode, it is important to understand the bus read/write timing of the microcontroller in detail, design the logic structure according to the timing diagram, and the communication timing must follow the fixed bus read/write timing in the microcontroller. The logic design of FPGA is also relatively complex. In terms of program design, it must be combined with the microcontroller program of the interface, and the I/O space that the microcontroller can access must be strictly arranged. When the microcontroller communicates and controls data with the FPGA in bus mode, its communication working timing is pure hardware behavior, and the speed is much faster than the previous method. In addition, if enough decoding outputs are set inside the FPGA, the microcontroller can communicate and control information exchange between the FPGA and the microcontroller through only 19 I/O lines, which can save the I/O lines of the FPGA chip. Its schematic diagram is shown in Figure 1.

2 Bus Interface Logic Design

2.1 Interface design concept

In the logic design of bus communication between MCU and CPLD/FPC, it is important to understand the bus read and write timing of MCU in detail and design the logic structure according to the timing diagram. The timing diagram of MCS-51 series MCU is shown in Figure 2.

ALE is the address latch enable signal, and its falling edge can be used to latch the lower 8-bit address into the address latch (LATCH_ADDRES) in the FPGA; when ALE latches the lower 8-bit address through P0, the upper 8-bit address has been stably established at the P2 port, and the microcontroller uses the low level of the read instruction enable signal PSEN to read the instruction from the external ROM from the P0 port. As can be seen from the timing diagram, the timing of the instruction reading is before the rising edge of PSEN. Next, the upper 8-bit and lower 8-bit data addresses are output from the P2 port and the P0 port respectively, and the lower 8-bit address of the P0 port is latched into the address latch by the falling edge of ALE. If data needs to be read from the FPGA, the microcontroller uses the instruction "MOVXA, @DPTR" to make the RD signal low, and the P0 port reads the data in the latch into the accumulator A; but if the data of the accumulator A is to be written into the FPGA, the instruction "MOVx DPTR, A" and the write enable signal WR are required. At this time, the high 8-bit and low 8-bit data in DPTR are output to P2 and P0 ports as high and low 8-bit addresses respectively, and then the low level of WR is combined with decoding to write the data of accumulator A into the relevant latch in the figure. [page]

By analyzing the read/write timing of the MCS-51 microcontroller bus, the interface circuit shown in Figure 3 was designed. In the FPGA, two modules are designed: one is the bus interface module, which is responsible for the bus interface logic between the microcontroller and the FPGA; the other is the register unit and external interface module, which is operated by the bus interface module.

In bus applications, the P0 port of the MCS-51 microcontroller is used as the address/data bus for time-sharing multiplexing, so a three-state buffer should be designed in the bus interface module to realize the three-state interface of the P0 port; and because the address of the MCS-51 microcontroller is 16 bits when accessing the external space, the address latch enable signal ALE is used to encode the high 8-bit and low 8-bit addresses in the FPGA and combine them into a 16-bit address, and then the read/write operations on the FPGA are realized according to the read/write signals of the MCS-51 microcontroller.

In the interface design, VHDL language is used to implement its interface logic. Writing in VHDL language is often more convenient and rigorous. Pay attention to the logical thinking of the whole process and try to avoid language redundancy, which will cause a long delay. -Part of the program of the communication read-write circuit between MCS-51 microcontroller and FPGA

[page]

FPGA is a new type of programmable logic device that can replace all existing microcomputer interface chips and realize multiple functions such as memory and address decoding in microcomputer systems. It has higher density, faster working speed and greater programming flexibility, and is widely used in various electronic products. In terms of function, the single-chip microcomputer has the characteristics of high cost performance, flexible functions, easy human-computer dialogue, and powerful data processing capabilities; while FPGA has the characteristics of high speed, high reliability, convenient development, and standardization. Therefore, the circuit structure combining the two types of devices will be widely used in many high-performance instruments and electronic products. Based on this demand, this paper designs the bus interface logic circuit between the MCS-51 single-chip microcomputer and FPGA, realizing the reliable communication of data and control information between the single-chip microcomputer and FPGA, making the advantages of FPGA and single-chip microcomputer complement each other, forming a flexible control system that can be programmed on-site in both software and hardware.

Keywords:MCS-51  FPGA Reference address:MCS-51 Single Chip Microcomputer and FPGA

Previous article:Design of Metronome Based on 89C51 Single Chip Microcomputer
Next article:Design of multifunctional electronic password lock based on AT89S51

Recommended ReadingLatest update time:2024-11-16 19:32

What are the application functions of MCS-51 microcontroller P0 port and P1 port?
What are the application functions of MCS-51 microcontroller P0 port? Answer: Port P0 is a three-state bidirectional port, commonly known as the data bus port, because only this port can be directly used for read/write operations on external memory. Port P0 can also be used to output the 8th-bit address of the ext
[Microcontroller]
Introduction to the components and circuit diagram of the minimum system of MCS-51 microcontroller
  MCS-51 microcontroller overview   The MCS-51 microcontroller is an integrated circuit chip that uses very large scale integrated circuit technology to combine a central processing unit (CPU) with data processing capabilities, RAM, read-only memory ROM, various I/O ports, interrupt systems, and timers. /Timer and oth
[Microcontroller]
Introduction to the components and circuit diagram of the minimum system of MCS-51 microcontroller
Design of real-time programmable high-precision signal source based on FPGA
  1 Introduction   As an electronic measuring and metering device, the signal source can usually generate a large number of standard signals and user-defined signals. Due to its high precision, high stability, repeatability and easy operation, it is widely used in the fields of automatic control systems, vibration exc
[Test Measurement]
Design of real-time programmable high-precision signal source based on FPGA
Design of a Color Image Enhancement System Based on FPGA
In the process from image source to terminal display, circuit noise, transmission loss, etc. will cause image quality to deteriorate. In order to improve the visual effect of the display, image enhancement processing is often required. Image enhancement processing is highly targeted and there is no unified evaluatio
[Embedded]
Design of a Color Image Enhancement System Based on FPGA
Design and implementation of high performance general-purpose parallel missile-borne computer based on DSP
0 Introduction With the development of technology, the scale of tasks that need to be processed in the fields of missile control and communication is getting larger and larger. Although with the development of VLSI technology, processors with computing power of several billion times per second have been pro
[Embedded]
MCS-51 Microcontroller Practical Subroutine Library (Part 2)
(11) Label: DIVS Function: Double-byte binary signed number division (complement code) Entry conditions: dividend is in R2, R3, R4, R5, divisor is in R6, R7. Exit information: quotient is in R2, R3 when OV=0, overflow when OV=1. Affected resources: PSW, A, B, R1~R7 Stack requirement: 5 bytes DIVS: LCALL MDS; calcul
[Microcontroller]
Remote medical monitoring system based on single chip microcomputer and FPGA
1. Design Purpose   With the rapid development of electronic information, remote medical monitoring technology has gradually become a hot topic in the medical field in recent years. Remote monitoring of important life parameters has brought convenience to the elderly and infirm, and has also made great contributions
[Analog Electronics]
Remote medical monitoring system based on single chip microcomputer and FPGA
Design and Application of MSK Modem Based on FPGA
Digital modems have been widely used in point-to-point data transmission. Conventional binary digital modems are based on analog carriers, and require analog signal sources when implementing the circuit, which brings inconvenience to all-digital applications. This paper analyzes the characteristics of MSK (m
[Embedded]
Design and Application of MSK Modem Based on FPGA
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号