Design of PLC backplane bus protocol interface chip based on single chip microcomputer and CPLD (Part 2)

Publisher:HeavenlySunsetLatest update time:2013-05-25 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

3.2 Hardware Programming Based on Verilog HDL Language

  This design uses Verilog HDL language to program the protocol chip. Verilog HDL language is a hardware description language. When designing digital chips, it can be described in layers and can perform timing modeling. This design uses a mixed design mode. The main design modules include state machine, protocol frame detection, FIFO controller design, etc.

  1) State machine design.

  The top module of the protocol chip is the state controller part. The protocol chip has four states, which are respectively processed by the state machine description pseudo code based on the Verilog HDL programming language as follows:

  2) Protocol frame detection.

  The frame checksum of this protocol chip is performed in a simple addition form. On the receiving side, if the sum of the useful data in the data frame is the same as the subsequent checksum byte, the protocol is correct, otherwise the frame is discarded. The code for calculating the protocol frame checksum is as follows:

  3)FIFO design.

  FIFO utilizes the resources of the embedded SRAM block of the MachXO series CPLD. Lattice's ispLEVER 7.0 software provides a configurable IP soft core, which can be implemented based on the embedded SRAM block or using a lookup table. The block diagram of the FIFO IP core is shown in Figure 4. The configurable parameters of the FIFO include FIFO byte depth, EmptyFull, Almostempty and AlmostFull trigger byte depth, data width, big-endian and little-endian modes, etc.

Figure 4 Configurable FIFO Controller IP Soft Core Block Diagram

  Figure 4 Configurable FIFO Controller IP Soft Core Block Diagram

3.3 Protocol Chip Synthesis

  The Verilog HDL program was compiled and synthesized by Lattice's CPLD development software ispLEVER 7.0. After many attempts, the MachXO2280 chip in Lattice's MachXO series CPLD was finally selected. The synthesized host protocol chip occupies about 60% of the CPLD resources, and the slave protocol chip occupies about 45% of the CPLD resources. The FIFO controller makes full use of the embedded RAM block inside the MachXO2280 chip, and uses the phase-locked loop to achieve high-frequency clock operation. Finally, the LSC ispVM(R)System burning software was downloaded to the CPLD chip through the JTAG port to perform protocol chip function verification tests.

  4 Conclusion

  The backplane bus protocol chip designed in this paper works stably and passes the group pulse test when the backplane serial bus clock frequency is 25MHz, the signal level is LVTTL, the bottom plate lead length is 40cm, and 1 host is connected to 3 expansion modules, which verifies that the design of this set of protocol chips is successful. Since this set of protocol chips is specially designed for the periodic and non-periodic data transmission of PLC, the hardware-implemented protocol frame controller supports high-speed communication and data frame verification functions, avoiding data transmission errors, greatly reducing the software overhead of the peripheral microcontroller, and enhancing reliability. It is a set of protocol chips that are very suitable for PLC backplane buses or backplane bus system protocol chips that require multi-module collaboration.

Keywords:MCU Reference address:Design of PLC backplane bus protocol interface chip based on single chip microcomputer and CPLD (Part 2)

Previous article:Design of PLC backplane bus protocol interface chip based on single chip microcomputer and CPLD (Part 1)
Next article:Qualcomm, a rising star, is catching up - mobile phone processor series (Part 2)

Recommended ReadingLatest update time:2024-11-16 21:47

Domestic automotive chips start to break through, and automotive MCU welcomes heavyweight players
For local automotive chip companies, this is an era full of opportunities. On the one hand, with the development trend of smart electric vehicles , capital in the automotive industry is accelerating its inclination towards the supply chain, and chip companies have more funds and confidence for development. On the ot
[Automotive Electronics]
Domestic automotive chips start to break through, and automotive MCU welcomes heavyweight players
51 microcontroller temperature control circuit
51 microcontroller temperature control circuit Microcontroller hardware system block diagram
[Microcontroller]
51 microcontroller temperature control circuit
The single chip computer program that controls the motor speed in three ways: button, temperature, and infrared
The circuit diagram is as follows:   The microcontroller source program is as follows: #include reg51.h #include intrins.h unsigned int times; unsigned int controlway; unsigned int flag = 0; unsigned int flaghongwai=0; //motor control sbit out3=P2^2; sbit out1=P2^0; sbit out2=P2^1; //Button control sbit button=
[Microcontroller]
The single chip computer program that controls the motor speed in three ways: button, temperature, and infrared
51 driver circuits for commonly used devices in microcontrollers
1. Introduction to IO The 51 microcontroller has a total of 40 pins, but only 32 of them can be used as IO, and every 8 pins are divided into one group, for a total of 4 groups. In order to achieve predetermined functions, the microcontroller must use various IO ports to complete various functions, including lighting
[Microcontroller]
51 driver circuits for commonly used devices in microcontrollers
Design of Advanced Frequency Meter Based on 51 Single Chip Microcomputer
The main functions implemented are: (1) The input signal type can be square wave signal, sine signal, triangle signal (2) The system measurement frequency range is 1Hz-20MHz (3) During the system frequency measurement process, the range is automatically changed, and no manual operation is required by the user, which
[Microcontroller]
Design of Advanced Frequency Meter Based on 51 Single Chip Microcomputer
51 single chip microcomputer realizes two cascaded 74HC595 chips to light up in sequence and only one can be lit at a time
1. Use proteus to draw a simple circuit diagram for subsequent simulation 2. Programming /******************************************************************************************************************** ---- @Project: LED-74HC595 ---- @File: main.c ---- @Edit: ZHQ ---- @Version: V1.0 ---- @CreationTime: 202005
[Microcontroller]
51 single chip microcomputer realizes two cascaded 74HC595 chips to light up in sequence and only one can be lit at a time
MCU delay method (Keil software delay)
There are four commonly used delay methods in C language, as shown in Figure 4-2. Figure 2-4 C Speech Delay Method Figure 4-2 shows four common delay methods in C language programming, two of which are inaccurate delays and two more accurate delays. Both for statements and while statements can change the delay time
[Microcontroller]
MCU delay method (Keil software delay)
Design of household heating bathing device based on single chip microcomputer control
introduction A key technology of the household electric hot water circulation heating bath introduced in this article is the nano material far infrared thin film electric heating tube. More than 20 materials such as tin chloride, silver carbonate, ferric chloride, aluminum oxide, zinc oxide, t
[Microcontroller]
Latest Analog Electronics 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号