ADS-based S3C2410 realizes embedded serial communication

introduction

ARM ADS is called ARM Developer suite (ARM Development Suite). ADS's CodeWarrior Integrated Development Environment (IDE) is based on Metrowerks CodeWarrior IDE version 4.2, with appropriate tailoring to support the ADS tool chain, providing a simple and diverse graphical user interface for management and development projects. Users can use ADS's CodeWarrior The IDE develops program codes in C, C ++ or ARM assembly language for ARM and Thumb processors, which shortens the user development project code cycle. ADS includes 3 debuggers: AXD (ARM Extended Debugger), ARMSD (ARM Symbo lic Debugger), ADW / ADU (Appliance Debugger Windows / Unix). In the initial stage of software development, you can use a debugger to simulate to test whether the developed software has achieved the desired effect.

In the actual development and application of data collection, serial port communication is an indispensable part. It is a very important and commonly used communication method between embedded systems and PCs. The computer's use of serial ports to control external devices such as microcontrollers reduces the hassle of complex assembly language programming when accessing external devices, and it also facilitates large-scale development and design. In the Linux system, the system uses the serial port and other peripherals as files to operate, which is very convenient in reading and writing the port, which greatly improves the system programming efficiency. After transplanting the Linux system to S3C2410, this article uses the serial port of S3C2410 to control the target. The hardware circuit and software implementation method of serial communication are introduced in detail.

Introduction to S3C2410 hardware platform

S3C2410 is a new generation of high-performance microprocessors produced by South Korea's Samsung. It is a 16 / 32-bit RISC processor based on the ARM920T core. Mainly used in embedded systems.

S3C2410 has powerful data processing capabilities. It also has a low cost. Low power consumption and other advantages. The applications on various handheld and mobile devices are becoming more and more extensive, and the program functions based on its platform are becoming more and more complicated. Therefore, the operating system with multi-threaded architecture on its platform has become the appeal of more and more system designers. This article introduces the specific implementation process of multi-threading on S3C2410.

Hardware structure

At present, most of the serial ports are used under Windows or Dos. This article uses serial ports to communicate under Linux. S3C2410 chip is a 16 / 32bit RISC processor produced by Samsung, independent 16kB instruction and 16kB data cache, MMU unit for virtual memory management, LCD controller (STN & TFT), non-linear (NAND) FLASH boot unit, system manager (including chip select logic control and SDRAM controller), 3 channels of asynchronous serial port (UART), each controller supports the highest baud rate can reach 230400 Boud / s, these characteristics are: It provides a reliable guarantee for the serial communication between the computer and the development board under the Linux system. WNSC400 is an electric displacement platform control box produced by Beijing Weina Optical Technology Co., Ltd. It has an RS232 serial port to enable S3C2410 to communicate with it through the serial port, thus enabling S3C2410 to control the electric displacement platform. However, the control box is implemented in a Windows environment, so it is difficult to apply it to an embedded system. If the serial port of S3C2410 needs to realize the data transmission with the control box, then the control box and the electric panning table controlled by it must be combined with other modules to form an embedded system, such as linking with a camera. , Process the collected data, and then calculate the displacement and other parameters that the target specifically needs to change, and then the control box reads these data in the memory through $ 3C24lO and issues a command to move the electric displacement platform according to the required amount of change. Is to achieve a simple embedded system. The hardware principle of the connection between the computer (host machine), target machine (S3C2410) and control box is shown in Figure 1. After downloading the program compiled in the ADS environment to the S3C2410 through the JTAG on the host machine, the S3C2410 can communicate with the control box through the serial port.

UART software

The universal asynchronous transceiver (UART) is a serial interface, and many peripherals are included in many microprocessors and microcontrollers. The asynchronous serial interface provides a simple way for two devices to communicate without sharing the same clock signal. If you add a suitable level converter, the serial port can also be used to communicate in RS-232 and RS-485 networks, or connected to the COM port of a computer. The serial port only needs two signal lines (Rx and Tx), and as long as the devices at both ends use the same bit format and baud rate, then they can successfully transmit data without any other party's information.

Lithium Battery

Lithium Battery,Lithium Batteries,Lithium Car Battery,Lithium Cell

SUZHOU DEVELPOWER ENERGY EQUIPMENT CO.,LTD , https://www.fisoph-power.com