Research and Implementation of Embedded Simulation System Based on SX52

Publisher:小星星龙猫Latest update time:2012-03-29 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

Information appliances (3C or IA) are no longer a strange name to people. They are innovative products that combine computer, telecommunication and electronic technologies with traditional home appliances. They are new home appliances designed for digitalization and network technology to penetrate into family life more widely. To connect them with external networks (such as the Internet) for information exchange, using home gateways for centralized management is undoubtedly an ideal solution. Home gateways are such simple, intelligent, standardized and flexible interface units for the entire home network. They can receive communication signals from different external networks and transmit signals to a consumer device through the home network. However, the standards for home gateways in terms of architecture and function allocation have not yet been determined, and research on them is in full swing.

This paper uses the SX52 embedded network single-chip microcomputer integrated development system main module to simulate the home gateway, and uses its peripheral expansion modules to simulate information appliances, thus successfully building a hardware and software platform that simulates the interaction between the home gateway and information appliances. This simulation of the home gateway and information appliances using a single-chip microcomputer integrated system provides an experimental platform for studying the internal architecture of information appliances and the functional allocation of home gateways and information appliances, while greatly saving resources and costs.

2 Theoretical research

2.1 Information Appliances

Information appliances are all home appliances that can exchange information through a network system. In other words, information appliances integrate digital technology and network technology into traditional home appliances such as refrigerators and washing machines and use this as a basis to establish a home network environment. Information appliances have the following characteristics: (1) they are connected by wire or wireless means, can identify each other, work together and network; (2) they can follow certain protocols and exchange information with external networks through home gateways or directly; (3) they have single functions [1] and are simple to use; (4) they have the characteristics of real-time, digital and intelligent; (5) they use embedded operating systems. Based on these characteristics, we divide its internal architecture into two major module layers: the upper layer is the software module, which is divided into the application layer (such as service registration, application protocol interpretation, etc.), the embedded operating system layer (such as embedded Linux, WinCE, etc.), and the device driver layer (such as LCD display driver, touch screen driver, etc.). The lower layer is the hardware module, including the core motherboard (including embedded processor chips such as S3C2410, etc.), the home appliance hardware and control layer (with built-in control module), and peripheral chips (such as RTL8019AS, Bluetooth, etc.). The core motherboard is the main controller, and the information appliances exchange information with the outside world through peripheral chips. Under the control of the core motherboard, they exchange information with the appliance control module in a two-way manner, thereby realizing the monitoring of the appliance hardware. The embedded operating system mentioned here will be used in the future as the functions of information appliances increase and become stronger. This article does not discuss it in the simulation system implemented on a single-chip microcomputer with limited resources.

2.2 Home Gateway

Individual information appliances can also have the function of directly connecting to the Internet. However, with the help of existing computer network technology, various home appliances and devices in the home can be connected to the Internet, and various rich, diverse, personalized, convenient, comfortable, safe and efficient services can be provided to people through the home network. All information appliances can be connected to form a home network, and the function of accessing the Internet can be moved to the home gateway. The home gateway will take on the responsibility of exchanging information with the Internet. This will not only reduce the load of information appliances and reduce costs, but also promote home networking, because different protocols can be used within the home network, which is more flexible. Therefore, to realize the exchange of information between the home network and the outside world, it is necessary to design an ideal home gateway. The two main functions of the home gateway are: (1) as a physical interface connecting the internal network of the home and the external network; (2) as a platform for residential users to obtain various home services (including existing services and services that may appear in the future, such as being able to open a friend's DVD player to watch a movie after authorization).

The current consensus on effective solutions for home gateway interfaces is to develop a centralized gateway, which will provide the most effective solution for bridging external networks and home networks or devices. In addition, using a PC as a home gateway is too large and has poor environmental adaptability. In addition, two network adapters must be installed (one for connecting to the Internet and one for connecting to the internal network), and the total cost is higher than that of a dedicated gateway. Therefore, it is completely necessary to design a dedicated gateway. In view of the functional characteristics of the home gateway, its logical structure should be as shown in Figure 1.

Figure 1 Logical structure of home gateway [page]

3 pieces of selection

3.1 Features of SX52

How to use the limited resources of the microcontroller to process information using TCP/IP protocol and turn it into IP data packets that can be transmitted on the Internet? There are currently two solutions: one is PC gateway + dedicated network, which has the disadvantage of adding wiring and third-party protocol conversion software; the other is 32-bit MCU + RTOS, which has the disadvantage of difficult development and extremely high cost. Using software to implement network protocols has the advantages of saving space and reducing costs compared to using chips with integrated network protocols. More importantly, various protocols can be configured or even modified at will, and can be updated in the future through software upgrades. Network control using the SX52 microcontroller of Ubicom Company in the United States has this advantage. Its main features are: (1) fast speed, reaching 100 MIPS at a frequency of 100 MHz; (2) ready-made network protocol modules for application, and network protocol stacks such as TCP, IP, HTTP, and SMTP can be run through virtual peripheral functions; (3) powerful virtual peripheral functions, that is, flexible configuration of I/O ports through software, and the CPU can drive ordinary I/O ports to simulate peripheral functions such as UART, SPI, IIC, and FSK by executing virtual software modules. It is very appropriate to use its successful network protocol modules and some practices suitable for small embedded systems to build field control.

3.2 SX52 main functional modules

3.2.1 CPU module (including online download ISP circuit)

This module realizes the system control of the development system board and realizes the network interface control, mainly including SX52BD. SX52BD is the main CPU of the development system board. It is a high-speed 8-bit microcontroller with RISC instruction set, with 4K×16-bit Flash memory and 262×8-bit RAM on the chip. Due to the use of CPU parallel pipeline mode and single clock cycle instructions, the instruction execution speed can reach 100MIPS. This microcontroller can be widely used in occasions that require network support, especially suitable for applications that require remote monitoring. The network protocols (IP, ARP, DHCP, UDP, TCP, HTTP, SMTP) implemented by the development system board are realized through this chip.

3.2.2 Network interface module

This module implements two network interface modes: Ethernet interface and modem interface, mainly including RTL8019AS, Ethernet transceiver filter chip, MAX232, etc.

3.2.3 User test area module

The signal pins of the main CPU have been connected to the periphery of the user test area, with 5 groups of 40 signal lines in total. Developers can use these signals to perform corresponding peripheral circuit expansion tests in the test area.

4 Design and implementation of the pseudo-system

4.1 Hardware Design and Implementation

This article chooses SX52 as a platform for simulating the interaction between information appliances and home gateways, which is very suitable because we use its user test area module to expand the peripheral module circuit (such as refrigerator remote control module) to simulate information appliances, and use the main module to simulate the home gateway to realize the control of information appliances through remote terminals (Web browsers or dedicated control clients). This article only discusses the use of dedicated control clients to achieve remote control of home appliances through serial port communication. An infrared remote control transmitter circuit (main chip CS5104) is added to the board to simulate the refrigerator, which can realize the remote control function of the refrigerator. At the same time, in order to understand the remote control effect of the development system, a remote control receiver circuit (main chip CS8206) is also added to respond to the remote control signal of the transmitter circuit. A remote control receiver status LED (9 pieces) is also added to display the status of the refrigerator. The hardware structure block diagram is shown in Figure 2. This article only gives the block diagram containing the refrigerator module, and adding other modules is similar.


Figure 2 System hardware block diagram [page]

4.2 Software Design and Implementation

To control information appliances through a dedicated control client, the control protocol must first be defined so that the information sent from the client can be unpacked by the home gateway to extract valid information and then converted into a control command to be sent to the information appliance to perform the correct operation. The system workflow is as follows:

(1) Initialize the main chip and peripheral chips after the development system board is powered on.

(2) Open the client program as shown in Figure 3.

(3) Configure the various options for controlling the refrigerator as needed. Click "OK" to start the refrigerator module on the development board. Then the service request sent by the client program (including the authentication request for connecting to the home gateway) passes through the RTL8019AS on the development board and is interpreted and verified by SX52. If the verification is successful, the converted request information is sent to the refrigerator remote control transmitter chip under the control of SX52. The chip sends the remote control signal to the remote control receiving circuit and responds to the remote control request through the corresponding LED display. Finally, by observing whether the display status on the control interface is consistent with the corresponding LED display on the development board (the slider indicating the temperature on the interface is designed with only three fixed temperatures, which are displayed separately by three LEDs on the development board), the simulation system can be verified to see if it is running successfully.

Figure 3 Dedicated control client interface

Considering the processing power of the single-chip microcomputer, defining a single character to transmit control information can not only save resources, but also shorten the response time and meet higher real-time requirements. Taking the simulation of the refrigerator module as an example, the information sent by the client program to the gateway is extracted by the gateway and forwarded to the refrigerator module. The control protocol is specifically implemented as follows: 'e' represents closing, 't' represents setting temperature (considering the limited processing power of the single-chip microcomputer, only "high, medium and low" are used to represent the temperature setting value), 's' represents the start/freeze speed (fast, standard, slow, and the default is standard after startup), and 'm' represents the working mode (power saving mode and normal mode). After selecting each option and pressing "OK", the control information is sent to the home gateway (SX52) in the form of a datagram. The home gateway then unpacks the package, extracts the effective control information from the client, and converts it into a form that can be recognized by the refrigerator module of the simulated information appliance, and finally sends it to the refrigerator module through the I2C bus. The corresponding lights at the back will brighten or dim according to the defined rules, and the state of the slider indicating the temperature will also change accordingly.

According to the protocol established above, create the client and add and modify the code in the corresponding files, and then follow the steps below to complete the final work:

(1) Create a client to implement the above protocol and display the control status information of the refrigerator. The page appearance is shown in Figure 3.

(2) Modify the i2c_uartdemo.src source file, change the serial port connection mode to Ethernet connection mode, and add refrigerator initialization code, interrupt code and protocol conversion module.

(3) Use the assembler/programmer software SXKey52.exe to download the file i2c_uartdemo.src to the development system board, and then use the client program running on the PC (as shown in Figure 3) to control the refrigerator hardware circuit on the development board.

5 Conclusion

Starting from the study of home gateways and information appliances, this paper selects a high-performance 8-bit SX52 microcontroller integrated system and performs hardware and software tailoring. It successfully uses peripheral hardware circuits and virtual peripherals and network protocol software virtual modules to build an embedded experimental platform that simulates home gateways and information appliances, laying a solid foundation for further research on the internal structure of home gateways and information appliances and the functional allocation between the two.

References

[1] Qin Bo, Zhang Jun, Design of a Security Gateway Based on Embedded System, Microcomputer Information, Vol. 21, No. 8-2, 2005

Reference address:Research and Implementation of Embedded Simulation System Based on SX52

Previous article:Research and development of intelligent systems based on face recognition technology
Next article:Design of teaching experiment platform for DSP56311EVM

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号