Abstract: To the family control system’s plan, the composition, the hardware disposition, the software design, the principle of work, the function as well as the technical performance have carried on the elaboration. Gave has carried on the data acquisition through the monolithic integrated circuit, and packed the ethernet agreement package through the network protocol processor the data to transmit to the ethernet on, thus realized based on ethernet’s remote control plan.
Key word: Ethernet; Control system; RTL8019AS; E5122
1 system synopsis
Family intelligent control system’s development mainly based on short information technology, automatic control technology, computer technology, digital communication technology and encryption technology. This system use related network, the computer system and the controller, realize the handset wireless remote control and the data transfer take the wireless network and the wired network as the basic control command and the data message transfer method, and through the short note control center which and the service center supposes specially, comes provides the omni-directional digitized service for the family and the plot management. The family intelligent control system has functions and so on handset remote control, auto-alarm, call community services, estate management. May also according to the user group need to life direction unlimited extent and so on networking service, intelligent work.
In ordinary circumstances, so long as turns on the equipment the Internet/Intranet net, so long as in principle realized the TCP/IP network protocol to be possible. The TCP/IP agreement and the application are a complex systems engineering. This agreement’s establishment must pass through the meticulous design process, the complete set agreement realizes is quite complex. Realizes this agreement in the embedded system to have certain difficulty. In practical application, if must realize this agreement completely, is directly carries on compared with the reasonable plan using the integrated TCP/lP agreement chip system central control unit and the TCP/IP protocol processing unit the separation.
On the other hand, may also carry on the simplification to original TCP/IP, but only retains some agreements which the practical application system needs, thus enables the core chip both to realize the network data transmission duty, and may complete to the duty monitoring. Because, carries on the simplification to the original TCP/IP agreement to be possible to reduce the difficulty which greatly the system realizes, simultaneously may also raise system’s efficiency and the reliability.
Figure 1
2 system principle of work
Shown in Figure 1 is based on the E5122 network protocol processor’s family network control system’s functional block diagram. In the chart, takes the gathering signal by the family in three table data, and will maintain it through the sampling electric circuit processing later sends in the monolithic integrated circuit, will then send in by the monolithic integrated circuit the data through the serial port in the E5122 network protocol processor to carry on pack processing, by will pack the TCP/IP agreement package the data, finally will transmit again this data packet through the RTL8019AS ethernet controller to the ethernet on. This system uses CPLD chip EPM7128S to take the decoding and the driving circuit. Because family user terminal generally to data exchange speed request not high (below 1MB/s), therefore may use the common high speed monolithic integrated circuit to read in the TCP/IP agreement, like this both may satisfy the function request, and can reduce the cost easily, the user also to accept such price.
3 TCP/IP agreement analysis chip E5122
E5122 is the Shanghai Fine Science and technology Company develops flies the rainbow series network protocol processor. Its exterior crystal oscillator frequency is 22.1184MHz, the working voltage is 5V. May realize the TCP/IP agreement for the hardware to provide the API connection, and may the I2C agreement or the RS-232 connection way and the subscriber’s premises carries on the correspondence, its correspondence connection retinaculum I2C connection MPU, simultaneously for did not bring I2C connection MPU to provide the I2C driver. E5122 and the network connection is the ethernet connection, may connect the ethernet through ethernet control chip RTL8019. Its serial speed may reach 115.2kbps most greatly, and may realize the true real-time transmission.
E5122 is completes the TCP/IP agreement the special-purpose chip, available realizes between the ethernet and the serial port protocol conversion, this component only needs external connection MCU to be possible to provide the consummation for the serial port equipment the network service solution. This system uses MPU is the 89C52 monolithic integrated circuit, moreover only need transfer the API function simply in the monolithic integrated circuit procedure then.
Shown in Figure 2 is the E5122 structure diagram. This equipment may do is the server end, when namely for the first time linked network, the client end initiative request connection server end takes the passive end to carry on the monitor, simultaneously accepts the local area network intranet far-end customer the initiative queried access, and may also take the equipment information returns for the customer 牳 Mongolia uncut jade bamboo pole type the client to be initiative and on the local area network or in-ternet main engine carries on the correspondence. The E5122 chip exterior uses 32kB RAM to come for the ethernet to carry on the data buffering. It uses 256 bytes (few is 256 bytes) serial EEPROM (I2C bus interface) memory system parameter. The user may carries on the correspondence through the serial port and E5122, the E5122 function be: Completes the TCP/IP agreement and the serial port communication protocol, simultaneously supports the ordinary serial port and subscriber’s equipment’s interaction, and may realize the network connections through the external connection RTL8019AS control chip.
4 hardware circuit design
4.1 interface circuits
When concrete use, as a result of monolithic integrated circuit’s limit, design may use jumps the line way to meet the JP pin the high level; But transmits the network data with E5122 and the RTL8019AS connection.
When system primary movement, E5122 will carry on the initialization to RTL8019AS, simultaneously will establish its working pattern as well as the interrupt source and so on. RTL8019AS receives when the data will trigger the E5122 interrupt, this time E5122 will choose RTL8019AS through A8~A13 and A15 the register address and the memory address and controls and realizes the data read, when will have the data for RTL8019AS through the E5122 transmission, the system through the address wire will establish RTL8019AS the corresponding register to carry on the data transmission. Its concrete interface circuit as shown in Figure 3.
4.2 I2C main line data-carrier storage
The I2C main line is the INTER INTEGRATED CIRCUIT BUS abbreviation, namely “interior integrated circuit main line”. The I2C main line is the serial communication interface specification which first proposed by Philips Corporation, this main line use serial data line 煟 cherry mold grain of 牶 pain good clock line 煟 cherry vast ta 犂 lip good host’s from component data transmission, the connection is very simple.
On I2C main line’s data transfer rate may reach 100kbit/s, under the fast pattern may reach 400kbit/s. In I2C main line transmission, when SCL is high, SDA by Gao Biandi to start the condition; But when SCL is high, SDA by lowly becomes Gao Zewei stop condition. SDA and SCL are the two section line, the SDA on-line data in the clock for the high period must be stable, only then, when SCL on-line clock signal for low, in the data line condition only then may change. Outputs the SDA on-line each byte to be 8, each time transmits the byte does not receive limits, but each byte must have a reply position.
4.3 isolation coupling transformer
When design after should use 1 煟 prepares at the same time the quilt radon urine kind of witchcraft sole to avoid the induced tension damage which, the thunder and lightning causes level electric circuit. In addition, but must complete the balanced - not balanced transformation isolation, the transmission and the match.
4.4 replacements and watch-dog electric circuits
Through the watch-dog electric circuit may when the procedure runs flies or halts, to the system carries on again the setting or the replacement, causes the system recovery normal operation. Its electric circuit as shown in Figure 4. This electric circuit uses MAX813L to complete the power source replacement and the watch-dog function.
in 5 applications should pay attention several technical questions
In the practical application process, should pay attention to the following several questions:
(1) transmission speed
In the system, superior PC machine and between the lower position observation equipment’s data exchange speed are decided by the ethernet interface module transmission speed; But its transmission speed is decided by the ethernet connection chip speed, monolithic integrated circuit’s processing speed as well as with the equipment exchange data way.
The observation system must transmit is generally the control command and the metrical data, and data quantity not big 犇? Between the prong argon cookery yan uncut jade steel may select serial port methods and so on RS-232, RS-485, Can carry on the connection, its correspondence speed only several dozens kb/s or over a hundred kb/s. But the ethernet connection chip’s speed (10Mb/s) and microprocessor’s speed is bigger than the serial port communication speed far. Therefore, the transmission speed is mainly decided by the serial port correspondence speed.
When to transfer rate request very Gao Shi (for example transmission image), between the ethernet interface module and the observation equipment cannot use the serial port to carry on the connection again, but must use and the mouth connection. By now the transmission speed was decided by microprocessor’s processing speed. The suggestion selects some high speed monolithic integrated circuits, like P89C52RX series or SX series and so on.
(2) IP address
In the ethernet observation system’s observation equipment must enter the ethernet through the module, must determine own IP address. The IP address obtains has two ways: First, the tendency obtains the IP address; second, assigns the IP address fixedly. Because E5122 does not support the RARP inverse address resolution protocol, therefore is unable to obtain the dynamic IP address, can only use the fixed IP address.
(3) safety control
Carries on the observation when the small enclosed local area network, the security problem is not generally big. But carries on the observation when the WAN even Internet, the safety control is very important. Therefore, should use 48~128 user passwords to protect observes and controls equipment’s security, causes the validated user to be possible to revise, to establish own password. Even if the such network illegal user has stolen the IP address, because does not have the user password, is also unable the operating equipment.
(4) timely question
The observation system must emphasize its timeliness in many situations, but the ethernet is not a real time system. Its carrier interception collision detection (CSMA/CD) the mailing address decided in the ethernet a IP package of transmission to be able to have the detention, even drop, this was composes the distributional observation system’s biggest shortcoming using the ethernet. But, ethernet’s speed is now getting quicker and quicker, in 100,000,000,000,000 even milliardfold nets or some small enclosed local area network, when network busy degree greatly for reduction, the IP package has not conflicted nearly, thus the transmission delay, the drop phenomenon will reduce greatly, but will not interfere with the observation system’s normal work. Meanwhile above system’s network level, if can increase the reply agreement, then the drop question may the basic solution.
(5) connection mode
This module has two plugs: One is the RJ-45 plug, available twisted pair line direct connection ethernet; Another is 25 foot plugs, contains RS-232 or the RS-485 bus interface.
6 concluding remark
The tender wrinkly gauze region between the heart and the diaphragm reads aloud the bank along with the 21st century’s arrival 熑 dead Di Zhen⑹Shell. Electrical appliances’ network will give has hastened the saturated electrical appliances consumer market to bring the new demand. Caused people’s life style, the working as well as the thinking mode to this aspect’s further research has had the huge change, simultaneously has also stimulated the people to each kind of data pool and the network service demand day-by-day growth. Therefore this article introduced the plan has certain practical and the commercial value without doubt.