Design of single chip computer simulation information appliance

Publisher:WhisperingSoulLatest update time:2011-08-25 Source: EEWORLD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

At present, information appliances are still in the early stages, the standards for information appliances have not been determined, and there has been no breakthrough in their research. In addition, as various home digital products centered on PCs begin to emerge, in future digital homes, the status of PCs as the control center of home applications will be increasingly valued.

This paper uses SX52 single-chip microcomputer and peripheral expansion modules to simulate information appliances, and uses PC to simulate home gateway, thus successfully building a platform for simulating the interaction between home gateway and information appliances. This simulation of information appliances using a single-chip integrated system provides an experimental platform for studying the internal architecture of information appliances and the functional allocation of home gateway and information appliances, while greatly saving resources and costs.

Innovation: This paper describes a general method for simulating information appliances by using SX52 as the main chip and expanding peripheral circuits and software modules, and implements it specifically by simulating an electric fan, providing a basic experimental platform for subsequent research on information appliances and home gateways.

2 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 to each other by wired or wireless means, can recognize each other, work together and network;

(2) Ability to follow certain protocols and exchange information with external networks through home gateways or directly;

(3) Two-way communication with users, single and centralized functions, easy to learn, and simple to use;

(4) Information appliances should be real-time, digital and intelligent;

(5) Apply embedded operating system. Its internal architecture can be represented by the following figure:

The embedded operating system layer shown in the dotted box is an inevitable trend in the future as the functions of information appliances increase and become stronger. This article does not use an embedded operating system when implementing the simulation system on a single-chip microcomputer, which greatly saves resources and costs.

3 Home Network and Home Gateway

With the help of existing computer network technology, home networks connect various home appliances and devices to the Internet, providing people with a variety of rich, diverse, personalized, convenient, comfortable, safe and efficient services through the network. To achieve the exchange of information between the home network and the outside world, it is necessary to design an ideal home gateway. The home gateway is a simple, intelligent, standardized and flexible interface unit for the entire home network. It can receive communication signals from different external networks and transmit the signals to a consumer device through the home network. The two main functions of the home gateway are: (1) as a physical interface connecting the home internal network and the external network; (2) as a platform for residential users to obtain various home services.

The current consensus on an effective solution for the home gateway interface is to develop a centralized gateway that will provide the most effective solution for bridging external networks and home networks or devices.

4 Embedded Web Server

Embedded Web Server (EWS) refers to the introduction of Web servers into field test and control equipment. With the support of the corresponding hardware platform and software system, traditional test and control equipment is transformed into Internet-based network test and control equipment with TCP/IP as the underlying communication protocol and Web technology as the core. Compared with traditional Web applications, the EWS system simplifies the system structure and integrates information collection and information release into the field measurement and control equipment. With standard interface forms and communication protocols, the Web server embedded in the device can provide a unified browser-based operation and control interface to any legitimate user who accesses the network where it is located, and the browser becomes the front-end control panel of the device. Due to the openness and independent platform characteristics of Web technology, the design and maintenance workload of software systems and communication systems is greatly reduced, the cost of personnel training is saved, and the management level of field test and control equipment is improved.

5 Hardware Selection

5.1 Advantages of SX52

The technical difficulty of using a single-chip microcomputer to implement an embedded Internet solution is: how to use the limited resources of the single-chip microcomputer itself to process the information using the TCP/IP protocol, so that it can be converted into an IP data packet that can be transmitted on the Internet. There are currently two solutions to this problem: one is PC gateway + dedicated network, the disadvantage is that it requires additional wiring and third-party protocol conversion software; the other is 32-bit MCU + RTOS, the disadvantage is that it is difficult to develop and the cost is extremely high. Using software methods 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 with future developments through software upgrades.

Network control through the SX52 microcontroller of Ubicom Company of the United States has its unique advantages, mainly reflected in:

(1) Fast speed, reaching 100MIPS at 100MHz frequency;

(2) Ready-made network protocol modules are available for application, and network protocol stacks such as TCP, IP, HTTP, and SMTP can be run through virtual peripheral functions;

(3) Powerful virtual peripheral function, that is, flexible configuration of I/O ports through software, CPU executing virtual software module can drive ordinary I/O ports to simulate peripheral functions, such as UART, SPI, IIC and FSK, etc. It is the wisest approach to use its successful network protocol module and some practices suitable for small embedded systems to build a field control Web server.

5.2 SX52 main module features

5.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 and 24C256.

The main CPU of the SX52BD development system board is a high-speed 8-bit RISC instruction set microcontroller produced by UBICOM. It has 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 under the drive of 100MHz crystal oscillator. With its excellent performance, this microcontroller can be widely used in occasions that require network support, especially suitable for applications that require network remote control or remote monitoring. The network protocols (IP, ARP, DHCP, UDP, TCP, HTTP, SMTP) implemented by the development system board are realized through this chip.

The EEPROM device 24C256 is used to store web page content. The main CPU accesses 24C256 through the I2C bus. The stored web page content can be browsed, re-downloaded and updated through the read and write operations of the main CPU.

5.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.

5.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.

5.2.4 Debugging, emulating and downloading modules

The development system board has debugging, simulation and download interfaces. Through the SIP4-pin socket (SX-KEY) in the CPU module, it can be connected to the "SXKEY" provided by UBICOM

When the emulation head is connected to this socket, online system emulation (including single-step, breakpoint and other functions), debugging, and program ISP mode programming download can be realized.

6 Design and implementation of simulation system

6.1 Adding peripheral hardware circuits

This article chooses PC and SX52 as the 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 the electric fan remote control module) to simulate information appliances, so as to realize the control of information appliances through remote terminals (Web browsers or dedicated control clients). This article only discusses the use of embedded Web servers to realize the remote control of home appliances through Web pages. The electric fan remote control transmitter circuit (main chip CS5104) is added to the board, which is directly controlled by the main CPU and can realize the remote control function of the electric fan. At the same time, in order to understand the remote control effect of the development system, a remote control receiving circuit (main chip CS8206) is also added, which can respond to the remote control signal of the transmitter circuit. The remote control receiving end status LED (12 pieces) is also added to display the status of the electric fan. The hardware structure block diagram is shown in Figure 2. This article only gives the block diagram containing the electric fan module, and adding other modules is similar.

6.2 Software Design and Implementation

To control information appliances through the web page of the browser, we must first define the control protocol so that the information sent from the gateway can be received and interpreted by the appliances and the correct operation can be performed. 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 PC browser and enter http://10.1.1.20/index.htm. The request to connect to the embedded Web server sent by the browser passes through the RTL8019AS on the development board, and then is interpreted by the SX52. Under its control, the read request is sent to the 24C256 that stores the web page. The 24C256 retrieves the web page according to the command sent by the SX52 and sends it to the PC browser through the RTL8019AS, thus opening the remote control terminal as shown in Figure 3.

(3) Select "Speed" in Figure 3 and click "OK" to start the electric fan module on the development board, and then click the previous option to control the fan as needed. The browser will transmit the control information to RTL8019AS through the network cable, and then the SX52 will interpret it and convert it into a control command and send it to the electric fan remote control transmitter chip. The chip sends the remote control signal to the remote control receiving circuit through the corresponding LED display, thereby responding to the control request. Finally, by observing whether the status of the light on the control interface matches the corresponding LED display on the development board, the simulation system can be verified to see whether it is running successfully.

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 electric fan module as an example, the control protocol sent to the gateway through the web page is implemented as follows: 'e' represents off, 'f' represents timing, 'g' represents wind speed/start, 'h' represents working mode, and 'i' represents shaking head. Each time you select an option and press "OK", the corresponding character above is sent to the information appliance (SX52), and the corresponding light behind it will brighten or dim according to the defined rules.

Add and modify the code, and then follow the steps below to complete the final work:

(1) Create a control page to implement the above protocol and display the control status information of the electric fan. The page appearance is shown in Figure 3. Then calculate the size of the page and use the SX52-specific hash function to calculate the URI.

(2) Modify the IP address value and URI value of the development board in the Eth_my3.src source file, delete the DHCP, SMTP and other modules, and add the fan initialization code, interrupt code and protocol conversion module.

(3) Use the assembler/programmer software SXKey52.exe to convert the file e2file3ttm1.

src to the development system board, and then use the loader E2File running on the PC.

exe loads the web page into EEPROM, and uses SXKey52.exe again to download the web server program Eth_my3.src to the development system board. Finally, open the browser on the PC and enter http://10.1.1.20/index.htm in the address bar to see the interface shown in Figure 3. Through this interface, the electric fan hardware circuit on the development board can be controlled.

7 Summary

Starting from the study of the internal structure of information appliances and home gateways, 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 a platform for simulating information appliances, laying a solid foundation for further research on the internal structure of home gateways and information appliances, as well as the functional allocation and communication protocols between the two.

Reference address:Design of single chip computer simulation information appliance

Previous article:Analysis of music played by microcontroller
Next article:Electric Scooter Controller Based on AVR Microcontroller

Latest Industrial Control Articles
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号