Abstract: To the family control’s system plan, the system composition, the hardware disposition, the software design, the principle of work, the function as well as the technical performance carry on the elaboration. This system through the monolithic integrated circuit gathering data, packs the ethernet agreement package through the network protocol processor the data, transmits to the ethernet on, thus realizes based on ethernet’s remote control.
Key word: E5122 ethernet control system RTL8019AS
Introduction
Along with the information technology, the computer network technology’s rapid development and the widespread popularization, more and more families obtain the information and the information through Internet or Intranet. As the modernized intellectualization residential district, provides the wide band multimedia synthesis information information service to community’s in general inhabitants, is intellectualized housing important manifestation, is also the objective need which the information society develops. The ministry of construction housing industry office proposed our country housing intellectualization’s concept, namely the residential district intellectualization is using 4C (computer, correspondence, network, automatic control, the IC card) the technology realizes the long-distance family intelligent control truly, through the effective transmission network, the long-distance information service and the management, the estate management with An Fang, the housing intellectualization system integration, serves for the residential district with the management provides high-tech the intellectualized method, realizes quickly the highly effective over value service management by the time, provides safely comfortable lives at the environment.
1 system synopsis
Family intelligent control system’s development based on short information technology, automatic control technology, computer technology, digital communication technology and encryption technology. The system use related network, the computer system and the controller, take the wireless network and the wired network as the basic control command and the data message transfer method, realize the handset wireless remote control and the data transfer. Through short note control center which and service center supposes specially, 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, but may also need to live Lian Wang according to the user group to serve, direction unlimited extent and so on intelligent work.
The equipment turns on the Internet/Intranet net, in principle says, so long as realizes the TCP/IP network protocol to be possible. The TCP/IP agreement and the application are a complex systems engineering. This agreement’s establishment passed through the meticulous design process, complete set agreement realization is quite complex. In the embedded system, realizes this agreement to have certain difficulty. In actual application, if must realize this agreement completely, compared with the reasonable plan is the direct use integration TCP/lP agreement chip, carries on the separation system central control unit and the TCP/IP protocol processing unit.
On the other hand, realizes in several other plans, may carry on the simplification to original TCP/IP, some agreements which the retention practical application system needs, enables the core chip both to realize the network data transmission, and may complete the monitor task. Jumps a line of simplification to the original TCP/IP agreement, may reduce the difficulty which greatly the system realizes, and raises system’s efficiency and the reliability.
Figure 1
2 system principle of work
This system’s functional block diagram as shown in Figure 1.
In the family three table number of degree takes the gathering signal, maintains electric circuit processing after the sampling, sends in the monolithic integrated circuit to carry on processing. The monolithic integrated circuit sends in the data through the serial port in the E5122 network protocol processor to carry on pack processing, packs the TCP/IP agreement package the data, this data packet transmits through the RTL8019AS ethernet controller to the ethernet on. Uses CPLD chip EPM7128S to take the decoding and the driving circuit. In this application situation, the family user terminal is not high to data exchange’s speed request, below 1MB/s. Therefore may use the common high speed monolithic integrated circuit, reads in the TCP/IP agreement, like this both may satisfy the request, the price and can let the user accept.
3 chip introductions
(1) network interface controller RTL8019AS
RTL8019AS is the Realtek Corporation high integration rate special-purpose ethernet connection chip, supports EthernetII, IEEE802.3, 10Base5, 10Base2, 10BaseT, supports UTP, AUI&BNC, the PnP automatic-detection pattern, and in inlays 16KB SRAM to use in receiving and dispatching the cushion, reduced to the main processor’s speed request. Supports 8, 16 bit data main line pattern; The support jumps the line, not to jump the line pattern; Has full-duplex’s correspondence connection, may simultaneously transmit and the receive data through the switchboard in the twisted pair line, makes the band width to increase 20M from 10M, is uses for to carry on the ethernet correspondence the ideal chip.
RTL8019AS has 3 workings:
① Jumps the line way, network card’s I/O and the interrupt by jumps the line decision;
② Namely inserts namely uses the way, carries on by the software disposes plug and play automatically;
③ Passes the line way, network card’s I/O and the interrupt by in the external connection 93C46 content decision.
Which way does the network card use to decide by RTL8019AS 65th foot JP. 65 foot JP is when the high level (receives VCC or pulls through a 10kΩ resistance in) uses jumps the line way; When the RTL8019AS pin is hanging, the input state for the low level (other pins is also this, hanging input foot level is low level, inside has 100kΩ under to pull resistance).
64 foot AUI, this pin decided that uses AUI or the BNC connection. We use the network card connection is generally BNC, very little uses AUI. The BNC connection way supports 8 double to twist or the coaxial cable. When high level uses the AUI connection, hanging is the low level, uses the BNC connection. The IOCS16B pin pulls with the resistance under for the low level, chooses 8 bit data main line pattern, omits the BROM module, only needs 8 data line SD0~SD7. Base address choice pin IOS3, IOS2, IOS1, IOS0 meet spatially for the low level. Because the chip interior meets has pulls the resistance, this time the I/O base address is 300H, therefore address wire SA8, SA9 meet the high level. Also because register’s address displacement quantity is 00H~1FH altogether 32, therefore has only used address wire SA0~SA4, other address wire earth then. The chip broken line by IRQS2, IRQS1, IRQS0 decided that meets spatially completely when the broken line is in the INT0,8 root broken line 7 meets spatially. When SMEMRB and SMEMWB pin decision network interface type, 10BaseT, 10Base2 or 10Base5 select when the hanging method is the low level. Namely for automatic selection way. The AUI pin decided that uses AUI or the BNC connection, is hanging when is the low level. Uses the BNC connection, supports the twisted pair line or the coaxial cable, uses the pin includes: TPIN , TPIN-, TPOUT , TPOUT-, turn on the network card coupling insulating transformer, realizes using the RJ45 plug with the network connection.
(2)TCP/IP agreement analysis chip E5122
E5122 is the Shanghai Fine Science and technology Company develops flies the rainbow series network protocol processor. Exterior crystal oscillator 22.1184MHz, working voltage 5V. Realizes the TCP/IP agreement by the hardware, provides the API connection, has facilitated the use enormously, by exterior integrates RAM. Carries on the correspondence to the subscriber’s premises by the I2C agreement or the RS-232 connection way, correspondence connection retinaculum I2C connection MPU, for does not bring I2C connection MPU to provide the I2C driver. E5122 and the network connection is the ethernet connection, connects the ethernet through ethernet control chip RTL8019. The serial speed reaches 115.2Kbps most greatly, achieves the true real-time transmission.
E5122 is completes the TCP/IP agreement the special-purpose chip, with realizes between the ethernet and the serial port protocol conversion. May provide the consummation for the serial port equipment the network service solution, only needs external connection MPU. This system uses the MPU model is: 89C52 monolithic integrated circuit. In the monolithic integrated circuit procedure, only needs to transfer the API function then to realize simply. E5122 structure as shown in Figure 2. The equipment does is the server end, when namely for the first time linked network, the client end initiative request connection server end takes the passive end monitor, and receives the connection the local area network interconnection network receive far-end customer initiative queried access, and gives the equipment information returns the customer; Similarly, but may also take the client to be initiative and in the local area network, or on the Internet main engine carries on the correspondence. The E5122 chip exterior uses 32KB RAM, uses for to take the ethernet data buffering, uses 256 bytes (few is 256 bytes) serial EEPROM (I2C bus interface) memory system parameter. The user realizes the correspondence through the serial port and the E5122 connection. E5122 completes the TCP/IP agreement and the serial port communication protocol. Supports the ordinary serial port and the subscriber’s equipment carries on alternately, realizes the network connections through the external connection RTL8019AS ethernet control chip.
When system primary movement, E5122 will carry on the initialization work to RTL8019AS, and will establish its working pattern as well as the interrupt source and so on.
When RTL8019AS receives the data, will trigger the E5122 interrupt. This time E5122 chooses RTL8019AS through A8~A13 and A15 the register address and the memory address, controls and realizes the data read. When has the data for RTL8019AS through the E5122 transmission, through the address wire establishes the RTL8019AS corresponding register to carry on the data transmission.
4 hardware circuit design
In the concrete use, as a result of monolithic integrated circuit’s limit, has carried on a series of simplified design. Uses jumps the line working, the JP pin meets the high level; E5122 and the RTL8019AS connection uses in transmitting the network data.
When system primary movement, E5122 will carry on the initialization work to RTL8019AS, will establish RTL8019AS the working pattern as well as the establishment interrupt source and so on. When RTL8019AS receives 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, will control and realizes the data read.
When has the data for RTL8019AS through the E5122 transmission, through the address wire establishes the RTL8019AS corresponding register to carry on the data transmission.
Connection circuit diagram as shown in Figure 3.
in 5 application several technical questions
In system’s practical application process, must pay attention to the following several questions.
(1) transmission speed
In the system, between superior PC machine and the lower position observation equipment data exchange’s speed, is decided by the ethernet interface module transmission speed. But the ethernet module’s transmission speed is decided by the ethernet connection chip speed, monolithic integrated circuit’s processing speed, as well as with equipment exchange data way.
In the general observation system, must transmit is merely the control command and the metrical data, the data quantity is not big. Between the module and the observation equipment uses serial port way connections and so on RS-232, RS-485, CAN, its correspondence speed only several dozens kb/s or over a hundred kb/s. By now the ethernet connection chip’s speed (10Mb/s) and microprocessor’s speed on was bigger than the serial port communication speed far. Therefore the transmission speed is mainly decided by the serial port correspondence speed.
When must transmit data rate request very Gao Shi (for example image), it cannot use the serial port connection again with the observation equipment, but must use and the mouth connection, by now the transmission speed was decided by microprocessor’s processing speed. This time, must select some high speed monolithic integrated circuits, like monolithic integrated circuits and so on P89C52RX series or SX series.
(2)IP address
In the ethernet observation system, observes and controls the equipment to enter the ethernet through this module, must determine own IP address. The IP address obtains has two ways: Has the tendency to obtain the IP address and to assign 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 in the small seal’s local area network, the security problem is not big, but carries on the observation on the WAN even Internet, the safety control is extremely important. Therefore, uses 48~128 user passwords to protect observes and controls equipment’s security. The validated user may revise, establish own password. Even if the network illegal user has stolen the IP address, 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. Because its carrier interception collision examines (CSMA/CD) 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 biggest shortcoming using the ethernet. But, ethernet’s speed is now getting quicker and quicker, 100,000,000,000,000 net even milliardfold net, or in some small seal’s local area network, the network busy degree to reduce greatly, the IP package has not collided nearly, the transmission delay, the drop phenomenon greatly reduce, will not interfere with the observation system’s normal work. At the same time, above system’s network level, may increase the reply agreement, the drop question may overcome basically.
(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.
Conclusion
Along with the 21st century’s arrival, the humanity strided in the information age gradually. Along with technical progress as well as to quality of life request unceasing enhancement, the people to electrical appliances’ choice and the use, already from only cared that electrical appliances’ single item function changes the pursue electrical appliances personal status and control convenient. The information technology and the network technology’s development, has provided the possibility for the domestic electric appliances home environment common control and the long-distance remote control. Fuse the information technology and the electrical appliances control technology, realizes the family life informationization and the automation in a greater degree, satisfies the people comfortably, the high rhythm life need, enabled all expense electronic products to have the company to enter the network ability, was precisely the expense class electronic products next step trend of development. Electrical appliances’ network will give has hastened the saturated electrical appliances consumer market to bring the new demand. To this aspect’s further research, caused people’s life style, the working as well as the thinking mode 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, puts the new vitality and the vigor for the information society, has the important theory, practical and the commercial value.