introduction
Embedded systems are "devices used to control, monitor, or assist the operation of equipment, machinery or plants" (devices used to control, monitor, or assist the operation of equipment, machinery or plants). It can be seen that the embedded system is a combination of software and hardware, and it can also cover auxiliary devices such as machinery. At present, a generally accepted definition in China is: a dedicated computer system that is application-centric, based on computer technology, software and hardware can be tailored, and adapted to the application system's strict requirements for function, reliability, cost, volume, and power consumption. Embedded system is a dedicated computer system that is application-centric, based on computer technology, software and hardware can be tailored, suitable for application systems, and has strict requirements on functions, reliability, cost, volume, and power consumption.
The main function of the system is to allow remote experts and related technical personnel to monitor the running status of multiple devices through the client side of the system through the computer. The server side of the system on the device side not only undertakes some tasks of real-time detection of the system status. The core of the embedded system is the hardware unit that controls and assists the operation of the system. The scope is extremely wide, from the original 4-bit processor, the 8-bit single-chip microcomputer that is still in large-scale application, to the latest 32-bit and 64-bit embedded CPU that is widely favored.
1 System hardware design
The ARM7TDMI core S3C44BOX is used as a microprocessor chip, the system hardware frame structure diagram is shown in Figure 1, and its circuit schematic diagram is shown in Figure 2.
1.1 Storage module design
The FLASH of the system uses HY29LV160 with a capacity of 2M bytes, which serves as the program memory of S3C44BOX, which stores the startup code, uclinux kernel, Ethernet MAC address, and application programs. The single-chip storage capacity of HY29LV160 is 16M bits (2 M bytes), and the operating voltage is 2.7 V~3.6 V. It adopts 48-pin TSOP package or 48-pin FBGA package, 16-bit data width, and 8 bits (byte mode) Or it works in 16-bit (word mode) data width mode. In the design process of this system, considering that the maximum capacity of the uclinux operating system with applications will not exceed l_7 MB, therefore, the use of a FLASH memory with a size of 2MB in Flash can meet the needs of the system. DRAM uses HY57V641620, which is used to set up the program stack and store various variables. The storage capacity of HY57V641620 is 4 groups x 16 M bits (8 M bytes), and the working voltage is 3.3 V. According to system requirements, 16-bit or 32-bit SDRAM memory systems can be built. But in order to give full play to the data processing capacity of the 32-bit CPU, the system uses a 32-bit SDRAM memory system with a total of 16 MB of SDRAM space.
Flash is an authoring tool that designers and developers can use to create presentations, applications, and other content that allows user interaction. Flash can contain simple animations, video content, complex presentations and applications, and anything in between. In general, individual content units created in Flash are called applications, even though they may be simple animations. You can also build Flash applications that include rich media by adding pictures, sounds, videos, and special effects. Flash is particularly suitable for creating content available over the Internet, because its files are very small. Flash does this through the extensive use of vector graphics. Compared with bitmap graphics, vector graphics require much less memory and storage space because they are represented by mathematical formulas rather than large data sets. The reason why bitmap graphics are larger is that each pixel in the image requires a separate set of data to represent.
1.2 Network interface module design
The network interface chip of the system uses RTL8019AS. It is a 10 M Ethernet chip that can provide Ethernet access for the system. The RTL8019AS data bus width is 16 bits. Therefore, the IOCS16B pin is pulled up in the design. Two pieces of RAM are integrated inside RTL8Ol9AS. A block of 16 kB, the address is 0x4000-7FFF; a block of 32 bytes, the address is 0x0000-Ox001F. 16 k RAM is used as a buffer for sending and receiving data. Generally, 0x4000-0x46FF is used as a sending buffer, and 0x4700-0x7FFF is used as a receiving buffer. The interrupt output INTO of RTL8019 is connected with the EINTO end of S3C44BOX.
I0S2 is pulled up, and the others are left floating. When the pin of RTL8019AS is left floating, the input state of the pin is low, and there is a 100 kΩ pull-down resistor inside. Therefore, IOSO, IOSI, and I0S3 are all low, and the chip's I/ 0 base address is 200H. Chip select AEN is connected to nGCS5 of the processor, which is Bank5, so the address range allocated by RTL8019 in the system is: 0xoa000000-0xoc000000. Because the data bus width is 16 bits, the processor's A1 is connected to 8019's SA0, and 20F001 is a network card filter, which contains a pair of low-pass filters and a pair of isolation transformers.
2 Construction of the system software platform
uclinux stands for micro-control linux. It is the "Linux system in the microcontroller field". It is the flagship product of Lineo and a model of open source embedded Linux. uCLinux is mainly designed for embedded systems where the target processor does not have a memory management unit (MMU). It has been successfully ported to many platforms. Since there is no MMU, the realization of its multitasking requires certain skills.
After changing the standard Linux kernel, uclinux has formed a highly optimized and compact embedded Linux. Although its size is small, uclinux still retains most of the advantages of Linux: stability, good portability, and excellent Its network functions, complete support for various file systems, and rich standard APIs are suitable for the establishment of remote configuration modules.
The system uses the GNU suite arm-elf tool chain: arm-elf-tools-20030314.sh to establish a cross environment for compiling uclinux. Copy arm-elf-tools-20030314.sh to the root directory and run the installation:
sh arm-elf-tools-20030314.sh can compile and port uclinux
After the cross-compilation is successful, the images directory is generated in the uClinux-dist/ directory, which contains three binary files image.ram, image.rom and romfs.img.
3 System software design
The software of the system is the core to realize the remote configuration module. Firstly, the process of bootloader is written to optimize the execution of the system on the development board, and then the development of application programs and device drivers is realized. The development of the application program is mainly based on the preparation of the Socket application program.
3.1 Design of Bootloader
The design of Bootloader is mainly to jump the system program execution to the execution location of the system kernel after the system is powered on and reset. For this main function, the kernel and other parts of the microprocessor must be initialized and other function extensions. Bootloader mainly completes the following processes:
(1) Establish an interrupt vector table
(2) Initialize various processor modes
(3) Introduce special variables
(4) Initialize memory
(5) Code copy
After completing the hardware initialization process of the system, the CPU usage rights are handed over to the operating system, which is completed. The ultimate goal of Bootloader.
3.2 Device driver development
Linux operation of the device Linux system access to the device is just like accessing files. For example, open the device using the system call open (), close the device use
14.8V Lithium Polymer Battery,Battery For Medical Equipment,Sc3000 Ni-Mh Battery,1.2V Ni-Mh Battery
Langrui Energy (Shenzhen) Co.,Ltd , https://www.langruienergy.com