ARM embedded control system design

Publisher:清新天空Latest update time:2012-11-16 Source: 21IC Keywords:ARM  AT91M55800A  μCOS-II Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
System design and implementation

1.1 System hardware foundation

The control system is designed based on the Atmel AT91M55800A microprocessor. AT91M55800A is a 16/32-bit microcontroller based on the ARM7TDMI core. Its processor core is a high-performance 32-bit RISC architecture; it has a high-density 16-bit instruction set and extremely low power consumption. It integrates 8 KB SRAM, vector interrupt controller VIC, advanced power management controller APMC and fully programmable external bus interface EBI on the chip; it has 3 USARTs, 58 programmable I/O lines, 6-channel 16-bit timer/counter, 8-channel 10-bit ADC and 2-way 10-bit DAC, providing a highly flexible and cost-effective solution for various ultra-low power applications.

Figure 1 is a hardware block diagram of the control system. The hardware design adopts a structured and modular design concept, which is easy to tailor. The communication interface includes RS232 serial communication interface, Ethernet interface and CAN bus interface. The Ethernet port can be connected to the industrial Ethernet. Combined with the ARM integrated development environment ADSl.2 and the online debugging tool Multi-ICE, the system can be simulated and traced in real time through the JTAG debugging interface and the Embedded ICE logic embedded in the processor.

1.2 System software foundation

(1) Porting of μC/OS-II

The tasks that the control system needs to complete are very complex, there are many peripherals to manage, and the programs are becoming more and more large, so porting an embedded real-time multi-tasking operating system is an inevitable choice. For small real-time control systems, the preemptive real-time multi-tasking operating system μC/OS-II with open source code, solidifiable and customizable, good portability, high stability and high reliability and a preemptive kernel is a good choice. The simple code of μC/OS-II has been applied to embedded systems such as smart meters, information appliances, wireless communication equipment and industrial machines.

It is relatively simple to transplant μC/OS-II to the AT91M5800A processor. Only three files related to the ARM architecture need to be modified: OS_CPU.H, OS_CPU_A.S and OS_CPU_C.C. The code volume is about 500 lines. The specific transplantation process will not be described in detail. There are many successful transplantation examples on the Internet. [page]

(2) Application of IEC 61131-3 standard software

The IEC 6113l-3 standard is the first programming language standard for digital control software technology formulated by the International Electrotechnical Commission (TEC) for industrial control around the world. It includes two parts: programming and common elements. Common elements describe the variables and data types of all common programming elements used in the five programming languages ​​of IEC61131-3 (instruction list, structured text, ladder diagram, function block diagram and SFC), IEC software model and communication model; it provides rules such as how to name these software elements, declare variables, and initialize variables and data types. It is an indispensable organic component for implementing the IEC61131-3 programming system. The programming part describes two important models: the IEC software model and the communication model. These two models constitute the conceptual basis for implementing a programming system that complies with the IEC61131-3 international standard.

The IEC61131-3 standard also defines a standard function and function block algorithm library, and users can also build their own algorithm library. Since the function and function algorithm library are written in ANSI C language, the user's control algorithm program has good portability and reusability.

The application of IEC61131-3 standard software on the hardware platform based on AT91M55800A is to run the IEC runtime system as a task of μC/OS-II. The code is as follows:

2 Serial communication programming

The program written by the user in the programming system based on the IEC6113l-3 standard can be downloaded to the target system (i.e. control system) through the serial port or Ethernet port for execution after compilation and linking. The choice of communication connection between the programming system and the target system is very flexible, which can be RS232 serial communication, Ethernet communication, or other communication methods. The following is the code designed for RS232 serial communication program based on AT9lM55800A.

Create a data receiving/sending buffer in memory:

[page]

Finally, write the interface communication program between the IEC runtime system kernel and the user program:

With the above code, the embedded control system can receive the user IEC program downloaded from the host computer, and the host computer can collect and monitor the real-time data in the control system. These real-time data can also be published to the industrial Ethernet to realize information sharing.

Conclusion

This paper introduces the design and implementation of an embedded real-time measurement and control system based on ARM and IEC61131-3 standards. The system has good openness, scalability and upgradeability. RS232 communication interface, Ethernet interface and CAN bus interface are designed to meet the networking needs of modern industrial control sites. The software programming adopts the IEC61131-3 international standard, which makes the developed user program have good portability and reusability.

Keywords:ARM  AT91M55800A  μCOS-II Reference address:ARM embedded control system design

Previous article:Embedded development ARM system code solidification serial port implementation
Next article:ARM embedded VGA interface production

Recommended ReadingLatest update time:2024-11-16 14:57

arm uboot platform burning information
1. Environment variable display U-Boot print baudrate=115200 bootargs=m=128M console=/dev/null initrd=0x23000000,17000000 mtdparts=atmel_nand:3M(kernel)ro,3M(rootfs),4M(wxjn_config),-(jnc_soft) root=/dev/ram0 rw  bootcmd=nand read.jffs2 0x22000000 0x0 0x300000;nand read.jffs2 0x23000000 0x300000 0x300000;bootm 0x220
[Microcontroller]
Implementation of FPGA Configuration from Serial in Embedded System Based on ARM
1 Introduction ARM (Advanced RISC Machines) can be considered a company. It can also be considered a general term for a type of microprocessor, or a technology. Microprocessor applications based on ARM technology account for more than 75% of the market share of 32-bit RISC microprocessors, and ARM technolo
[Microcontroller]
Implementation of FPGA Configuration from Serial in Embedded System Based on ARM
Intel, Arm, TSMC, ASE and other ten major manufacturers established the UCIe Alliance to jointly create chiplet interconnection standards
According to foreign media reports, ten industry giants including Intel, AMD, Arm, Qualcomm, Microsoft, Google, Meta, TSMC, ASE, and Samsung officially established the Universal Chiplet Interconnect Express (UCIe) Alliance yesterday, aiming to promote the UCIe technical standard, build a complete ecosystem, and make i
[Mobile phone portable]
Intel, Arm, TSMC, ASE and other ten major manufacturers established the UCIe Alliance to jointly create chiplet interconnection standards
Summary of common pseudo-operations in ARM assembly
In the process of analyzing the startup code in the 2410 project, in addition to some commonly used assembly such as ldr, str, bic, etc., there are some unfamiliar symbols that confuse us. After checking the information on the Internet, we found that they are some pseudo operations of ARM. In order to avoid major read
[Microcontroller]
ARM processor working status and mode
Two working states 1. ARM state: the processor executes 32-bit aligned ARM instructions; 2. Thumb state: The processor executes 16-bit aligned ARM instructions. The difference between them is that the Thumb instruction set is not a complete instruction set, it is a subset of the ARM instruction set. However, the Thu
[Microcontroller]
ARM processor working status and mode
【ARM】2410 bare metal series-ADC digital-to-analog conversion
Development Environment 1. Hardware platform: FS2410 2. Host: Ubuntu 12.04 ADC Register Configuration 1. Initialize ADC (ADCCON) Set the prescaler, prescaler factor, select the A/D conversion channel, select normal mode and start the conversion 2. Determine whether the conversion is completed (ADCCON ) 3. Read con
[Microcontroller]
【ARM】2410 bare metal series-ADC digital-to-analog conversion
ARM Study Notes 010 New Problems in Gcc Compilation
The previous division problem has not been solved yet, and now there is the following problem (without adding the raise function): The reasons given online are: I'm getting the "relocation truncated to fit: R_ARM_PC24 against symbol" error message when linking, what does this mean? You will get this error message
[Microcontroller]
ARM Study Notes 010 New Problems in Gcc Compilation
How to implement flush_cache_all in Linux Kernel on ARM platform
In the design of the driver, we may use flush_cache_all to flush the contents of the ARM cache to the RAM, because the cache in ARM Linux is generally set to write back. Usually, DMA cannot access the cache, so if we need to start DMA to write the contents in RAM to Flash or LCD framebuffer, then we need to call flu
[Microcontroller]
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号