The interface design of microprocessor and simulator control board based on ARM7

ARM (Advanced RISC Machines) is a 32-bit microprocessor that has been increasingly used in various fields in recent years. It is not only the name of a company, but also a general term for a class of microprocessors, including ARM7, ARM9, ARM9E, ARM10E, SecurCore and other series. Among them, the ARM7 series processor is a low-power 32-bit RISC processor, which is mainly used for products that require more demanding power consumption and cost. It supports 16-bit Thumb instruction set, and can be used in 16-bit systems using Thumb instruction set Overhead get 32-bit system performance.

introduction

ARM (Advanced RISC Machines) is a 32-bit microprocessor that has been increasingly used in various fields in recent years. It is not only the name of a company, but also a general term for a class of microprocessors, including ARM7, ARM9, ARM9E, ARM10E, SecurCore and other series. Among them, the ARM7 series processor is a low-power 32-bit RISC processor, which is mainly used for products that require more demanding power consumption and cost. It supports 16-bit Thumb instruction set, and can be used in 16-bit systems using Thumb instruction set Overhead get 32-bit system performance.

ARM is used as the core embedded system of the microprocessor. Because of its extremely low power consumption and high main frequency, it has the ability to perform high-speed operation and processing, and it can complete most complex applications. The embedded operating system using SamsungS3C44B0X microprocessor is very suitable as the control core of the embedded system, becoming the central control unit of the main controller of the system, and realizing parallel work through data interaction with other coprocessors through the communication interface. Therefore, how to efficiently design the interface between the main controller and the coprocessor, especially under the application conditions that need to be controlled by the multi-channel control board, to meet the real-time requirements of the system, is particularly important. In this system design, a certain type of simulator uses the S3C44B0X processor, according to the pre-set logical relationship and input data, after calculating the output of each channel analog channel, broadcast the control message to each analog control board in the system through the serial port , The analog control board in the channel can execute the control actions of each slave control board according to the relevant information of the broadcast control message, and return to the corresponding execution status of the main controller.

System hardware composition

The S3C44B0X microprocessor selected by the system is a cost-effective microcontroller solution provided by Samsung for handheld devices and general applications. It is a 16/32-bit ARM7TDMI core processor designed by ARM. It works at 66MHZ and can be built in uCLinux system. , Support JTAG-based on-chip integrated ICE debugging solution.

1.1 Features of processor integrated peripherals

S3C44B0X microprocessor uses 2.5VARM7TDMI core with 8KB Cache (SAMBA II bus architecture). In order to reduce the total system cost and reduce peripheral devices, this chip provides comprehensive on-chip peripherals, thereby minimizing the cost of the system. The resources are abundant, and the main integrated peripherals for system integration are shown in Table 1.

The interface design of microprocessor and simulator control board based on ARM7

1.2 System composition and external interface

The main controller system structure is shown in Figure 1. In addition to the serial port, it can also use EBI bus interface, extended network interface, extended SDRAM, external FLASH interface, etc., so that the main controller system can complete the external multi-channel control board. In addition to processing and control, functions such as external forwarding, storage or Display of information can also be realized.

The interface design of microprocessor and simulator control board based on ARM7

2 URAT unit structure of S3C44B0X

The URAT (Universal Asynchronous Receiver Transmitter) unit of S3C44B0X provides two independent asynchronous serial I/O ports, each of which can work in interrupt and DMA modes. Each URAT channel contains two 16-byte FIFOs (first in first out) for receiving and sending respectively. Each UART has an independent baud rate generator, transmitter, receiver and control unit. The baud rate generator can be driven by the on-chip system clock or by an external neighbor clock. Each transmitter and receiver has an independent data buffer and data shift register. The transmitter and receiver include a 16-byte FIFO and shift register. The data to be sent is first written into the FIFO and then copied to the transmit shift register. Then it is sequentially shifted and output from the data output port TxDn, and the received data is also shifted and input from the data receiving port RxDn to the shift register, and then copied to the FIFO. The block diagram is shown in Figure 2.

The interface design of microprocessor and simulator control board based on ARM7

The two serial ports TxD0, RxD0, TxD1, RxD1 included in S3C44B0X can all work in interrupt mode or DMA mode. The transmit/receive data frames are programmable. A data frame contains a start bit, 5 to 8 data bits, an optional parity bit and 1 to 2 stop bits, all of which are passed through the linear control register ULCONn control. The transmitter can also generate a stop condition, which guarantees to continuously output a logic 0 signal for one frame time. The signal must be carried out after the current transmission word has been transmitted.

The received data frame format is the same as the sent data frame format. The receiver can also detect overflow errors, parity errors, framing errors and abort conditions. In each case, an error flag is set.

Design of communication interface for multi-channel control board

3.1 Multi-channel simulator control board communication structure

The communication between each slave simulation control board of the simulator and the simulator main controller S3C44B0X adopts RS-485 level. When S3C44B0X is in working state, according to the given time interval, the calculated control information is transferred to the 485 bus through the serial port. Each slave analog control board sends control messages, and each slave analog control board is always in the monitoring state on the RS-485 bus. After receiving the corresponding information, it will reply to the main controller at the set time when the bus is idle. , Between each slave analog control board, you can also rely on the master controller, that is, adopt the slave-master-slave way to realize mutual data interaction or status query.

The interface design of microprocessor and simulator control board based on ARM7

3.2 Simulator communication control message design

Each slave analog control board receives the control message sent by the main controller and analyzes it. The structure of each frame must be clarified first, and then the relevant information can be extracted according to its structure. The current methods for defining the frame format of information transmission include: visible character encoding, internal reading of incompatible binary grids, and mixed encoding methods. For the master-slave communication structure used in this article, in order to facilitate debugging and external monitoring and reading, the visible ASCII code interface protocol is used to send each other. The data sent is mainly composed of frame header, frame tail and intra-frame data.

The interface design of microprocessor and simulator control board based on ARM7

During processing, the slave analog control board generally recognizes the content of subsequent data by judging the frame header, and then performs data extraction processing.

Since each data segment in the data frame is separated by a comma, when processing the buffered data, it is generally judged whether it is the frame header by searching for the ASCII code “$”. After identifying the type of the frame header, it can be judged by reading the device type. Whether the received information is related to the slave analog control board, and then by counting the number of commas experienced or the length of the character data, it is determined which control parameter is currently being processed, and the corresponding processing is made.

Concluding remarks

The hardware design of the whole system uses the resource-rich, fast and low-power ARM embedded processor, and provides a serial bus communication solution connected with multiple analog control boards. The ARM core can be used to miniaturize the system and greatly improve system performance. In practical applications, the multi-channel control board is easy to expand, and the control message information extracted from the bus can also be easily connected and debugged with various peripherals, making it easy to realize higher-level functions and applications, and has good application promotion value.

The Links:   TM150SA-6 LM4Q30TA

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *