1 Design of the hardware platform

The construction of the hardware platform is the primary task of the design of the embedded development platform. This article uses the more popular architecture and selects S3C44BOX as the embedded processor. Then, it selects peripheral devices around S3C44BOX and designs the overall hardware structure of the system. Then based on the unit circuit, the detailed process of schematic design is introduced.

1.1 System hardware selection

The core component of an embedded system is an embedded processor. The system hardware selection is first to select an embedded processor, and then to select various peripheral chips around the embedded processor to achieve various extended functions. This system selects Samsung's S3C4480X microprocessor based on ARM7TDMI. The chip can provide a low-cost and powerful microcontroller solution for handheld devices and general embedded applications.

1.2 Hardware structure design

The hardware platform is mainly composed of power supply circuit, MCU core circuit, memory circuit, UART interface, Ethernet interface, USB interface, LCD interface, RTC and IIC circuit, JTAG interface and system expansion interface and other unit circuits. Block diagram of hardware platform structure based on S3C44BOX development board.



l. 3 memory circuit

Figure 2 shows the address space distribution of S3C44BOX. S3C44BOX adopts the unified addressing method, and the 256MB address space is divided into 8 MemoryBANKs, among which BANK6 and BANK7 are DRAM spaces (the control method of DRAM is different from that of SRAM and cannot be mixed).



1.4 Ethernet interface circuit

The RTLS019AS chip integrates the media access control sublayer (MAC) and physical layer (PHY) functions, so it can interface with most general-purpose MCUs. Its high cost performance makes it a widely used lOMbps full-duplex Ethernet control Device.

Figure 3 shows the connection diagram of RTL8019AS and S3C44BOX, in which three programmable LED outputs can be used to display the working condition of RTL8019AS.



2μClinux system transplantation

In the English word μClinux, μ means Micro, small meaning, and C means Control, meaning control, so μClinux is Micro-Control-Linux, which literally means “Linux system designed for the field of micro control”. Linux is a very popular operating system, it is compatible with UNIX systems and is open source. It was originally designed as a desktop system and is now widely used in the field of servers.

2. Preparation before 1μClinux transplantation

When transplanting μClinux, you must first install the redhat9.0 operating system on the host machine, and then establish the μClinux development environment under redhat9.0, or you can download it from http: //www.μClinux. Download the source code and toolkit of μClinux at org /, and then install it.

2. 2 kernel and file system compilation

Linux as a free software, its kernel version is constantly updated. The new kernel fixes bugs in the old kernel and adds many new features. If users want to use these new features, or want to customize a more efficient and stable kernel according to their own systems, they need to recompile the kernel.

Because the flash used is only 2MB, which is relatively high for embedded Linux systems, because the kernel and file system cannot exceed 2MB. The research and development idea of ​​this article is to compress the kernel and file system together. time. The kernel will be automatically decompressed to SDRAM, and then you can run μClinux on SDRAM.

2. 3 kernel and file system configuration

After running makemenueonfig in the μClinux-Samsung directory, the ConfiguraTIon startup interface will appear first. Select TargetPlal-formSelecTIon in the ConfiguraTIon startup interface, usually with the following options:



Next you can configure the required kernel and file system. The configuration of μClinux is divided into two parts, the first part is the usual Linux kernel configuration, and the latter part is the configuration of the μClinux file system. The kernel configuration of μClinux will be performed first. The kernel configuration interface of μClinux will appear, and the kernel configuration interface can be configured according to the interface.

After configuring this part, you can exit and save, and then the system automatically enters the file system configuration of the next part of μClinux. The applications that can be realized by the μClinux embedded operating system are closely related to the configuration of this part. The file system configuration part of the μClinux can be performed below to complete the configuration of the μClinux file system.

After the kernel and file system of μClinux are configured, the kernel can be compiled.

2.4 Compilation steps

When compiling, you can run the following 9 commands in order under the μClinux-Samsung directory: makemenueonfig, makedep, makeclean, makelib_only, makeuser_only, makerotors, makeimage, make, makeimage.

After running the above commands, three files will be generated under the images subdirectory of μClinux-Sam-sung, of which image. rom and image. ram is the image file we need. image. rom is a compressed kernel. In development, the author put image. The rom is burned into the flash and started from the flash, and the image is decompressed to the Ox8000 of the ram, and then run. image. The ram is a kernel that contains debugging information, and can be directly downloaded to the ram of the development board using tools, such as using ICE to directly image. The ram is put in the place where the ram address is Ox8000, and the method of development and debugging can make the development and debugging more convenient.

3 Realization of Embedded Industrial Control Web Server

3.1 Basic realization of embedded Web server

The embedded Web server can be developed based on the Socket socket. It is mainly composed of an initialization module, a listening module, a request parsing module, a script engine module, an output module, and a command module. The relationship between the modules is shown in FIG. 4.



There are three main web servers under μClinux: httpd, thttpd and Boa. Among them, httpd is the simplest Web server, which has the weakest function, does not support authentication, and does not support CGI. Both thttpd and Boa support authentication, CGI, etc. The functions are relatively complete. Among them, boa is a single-task http server with open source code, high performance, and relatively little system resources. When the boa server receives the request, it does not start multiple server processes to process multiple requests, but processes all service requests in one process. In order to realize dynamic Web technology, you can choose to implement a BoaWebServer that supports CGI and is very suitable for embedded systems. Then through CGI programming in C language, you can achieve dynamic WEB.

3.2 Relocation of boaWebServer

boa is a single-task http server with open source code and high performance. At present, the source code of boa has been included in the code of μC1inux. When implementing Boa under μClinux, you need to configure and modify Boa. The core files of boa server mainly include boa. conf and mime. types, this design is mainly through the boa. conf and mime. The types file is modified to achieve.

3.3 Compile the kernel

After the configuration process is complete, the kernel can be recompiled. Select the Boa option when compiling, and download the compiled kernel to the development board, then start μClinux, complete the IP configuration, start BoaWebServer, and then you can access your web page through IE. If you want to start BoaWebServer automatically when starting μClinux, you can modify the rc file and enter the / μClinux-amsung / ven-dors / Samsung / S3C44BOX directory, and then add the following two lines to the running script rc

"Ifconfigeth0192.18.18.110

boa-c / home / & ”

After the modification, recompile the kernel and download it to the target system to run. In this way, after running μClinux, you can directly access the webpage through IE without configuration.

3. CGI monitoring technology under 4μClinux

CGI (Common Gateway Interface) can provide a Web server with a channel to execute external programs, this server-side technology can make the browser and server interactive. CGI programs are external programs that need to be compiled into executable files to run on the server. The browser can send the data input by the user to the Web server, and the Web server sends the data to the CGI program using STDIN. After executing the CGI program, it will also access some documents that store data, and finally use STDOUT to output the structure file in HTML form, and then send it back to the browser through the Web server, which can be displayed to the user.

If the CGI program is a local program, it also needs to be compiled into an executable file so that it can be run when called by CGI. The Web server transmits the user data to the CGI program, and redirects the output of the CGI program to the Web page. In this way, the CGI program encapsulates the data into HTML form and sends it to the output during processing, so that the client sees the corresponding Web page.

Visitors can remotely control the digital tube (simulating the control of the industrial site) through the CGI program and display the corresponding numbers. In the preparation of CGI programs, the general framework of each program is relatively similar, and its CGI program flow is shown in Figure 5, which mainly follows the communication of HTTP protocol. It also includes reading, writing, and controlling input and output.


3.5 Application of embedded industrial monitoring system

Internet-based remote monitoring has two implementation schemes: agent scheme and embedded scheme. Both implementation schemes adopt a three-layer B / S architecture, namely, presentation layer, application logic layer and data layer. The three-tier B / S architecture can avoid the redundancy generated by the client program implementing the application logic alone in the two-tier architecture; the application logic can be implemented on the application logic layer instead of on the client layer. Because the presentation layer is separated from the application logic, the amount of information transmitted by the network is reduced, and the system has higher scalability, maintainability, and flexibility. The basic structure of the embedded solution discussed in this article is shown in Figure 6.


4 Conclusion

The solution introduced in this article is equipped with a micro embedded Web server for each field device, which can be responsible for data collection, data storage, data forwarding and data interaction with the monitoring host. The advantages of this solution are strong real-time performance, high reliability, and unlimited number of field devices.

In Ear Bluetooth  Headphones with Perfect HIFI Quality Adopt Bluetooth CSR 4.2 technology, built-in CVC 6.0 Noise Cancelling technology, and professional sound chamber design, from the phone to earphones, from the Bluetooth Headphones to ears, or internal circuitry, every stage is always designed for perfect sound experience.

 This Bluetooth  Headphone brings no burden to your ear and make you feel comfortable long time! It is very simple and easy to operate with one hand to realize multi-functions by just touching the earbuds, such as music play / pause, call start / end / rejection / redial . Also you can modulate the volume by touching it twice (turn up)or three times(turn down)! How miraculous it is!

In Ear Bluetooth Headphones

In Ear Bluetooth Headphones,In-Ear Wireless Bluetooth,Wireless In Ear Headphones,In-Ear Wireless Earbuds

ShenDaDian(China) Digital Electronics Co.,Ltd , http://www.btearbuds.com