Abstract: E-Iink is one kind inexpensive, convenient, the exquisite serial port ethernet interface module. Along with Intemet vigorous development, the people may exchange the information in each place through the Internet. Each kind of smart instrument and the equipment should have into net’s function, through the E-link data transmitter, only need have the serial port to be possible to cause the existing equipment to turn on the network conveniently, no longer needs the PC network card equipment interface card, may turn on the ethernet conveniently directly through E-IJink. Uses inexpensive ” the E-Link network data transmitter “, substitutes for the field bus using the Internet, causes the original field bus’s distributional control system to transform conveniently based on ethernet’s distributional control system.
Key word: Ethernet: E-link: Serial interface: Network: Data transmitter
1 introduction
Along with Internet popularization and industrial automation rapidly expand. Network already thorough family, office, factory and automated control domain. The E-Link network connections controller content high speed microprocessor and the ethernet interface circuit, the serial port equipment passes through it to be possible to enter the person Internet to realize the observation system’s data resource sharing conveniently, it is connects the ethernet and the serial port equipment’s bridge. The ethernet interface circuit completes the lOBaseT ethernet physics level the correspondence, has read in the TCP/IP agreement in the high speed microprocessor interior with the C51 language and other (RS-232, RS-485, CAN and so on) transforms the agreement. Therefore is simple through the E-Link surfer’s serial port equipment, does not involve each kind of complex network protocol, only involves with the E-Link data exchange.
2 E-Link data transmitter synopsis
2.1 product characteristics
The E-Link data transmitter is one kind of miniature Internet turning on module. May turns on the distributional serial port equipment or other each kind of user’s intelligent system Internet, connects the ethernet using the module internal TCP/IP network protocol and the 10Base-T network interface, realizes the serial port equipment’s networking conveniently. The E-Link data transmitter has the volume exquisite _ power loss to be low, the cost is low and merits and so on easy to operate.
The serial port equipment may own information and so on running status and operational parameter provides by TCP or the UDP data packet way to the monitoring, may also realize the information live transmission. This method has the following several characteristics: (1) has not been away from and the national boundary limit, so long as has the ethernet then to correspond; (2) use widespread existence network resource. Does not need to lay down the field bus; (3) real-time transmission, the transmission speed is high. The serial speed may reach 115.2 kb/s.
The E-Link data transmitter may widely use in the communication system, the factory automation system, the bank and the insurance systematic, the long-distance dispersion-like device control, the large-scale retail sales system, the building automatic control system and the intelligent auto-alarm and the fire prevention interlock system.
2.2 major technique targets
MC [I is 16 AVR the MEGA high speed processor, crystal oscillator’s frequency is 14.745 6 MHz, its exterior storage capacity is 32 KB, the internal FLASH memory’s capacity is: 128 KB. may provide 16 MI/s the operation handling abilities.
Support agreement: ARP, IP, UDP, TCP, ICMP, DHCP and DNS.
Network interface: RJ45 (10BASE T) ethernet connection.
Connection form: RS232, RS422, .RS485, CAN main line.
Serial speed: 300 b/s-115 200 b/s.
Maximum transmission speed: 300KB/s.
Product size: 8.0 emXlO.O cm or is smaller.
Power supply way: AC or DC power supply.
Software support: Windows XP.Windows 2000.WindowsNT, Windows 95/98/ME. Unix Ware SVR4-2, UnixWare 7 SVR5, SCO Open Server, SCO UNIX, Linuxfixed tty for 2.0.x, 2.2.x and I, inux real tty for 2.O-36,2.2.x,2.4.x (all actuations under the system TCP/IP network).
The development board has 32 group switch quantity bidirectional I/O control and 8 group 10 A/D switch.
Development environment: Uses free AVR-GCC the C language to program. The user does not need to consider that purchases expensive AVR once more special-purpose C language compiler (e.g. IAR FORAVR, ImageCraftICCforAVR and CodeVison C and so on), moreover this development system is FREE-WARE, may defer to the request to carry on cutting out completely to the system, the high efficiency completes the development work.
3 hardware systems
3.1 basic dispositions and choose
The E-Link data transmitter’s basic disposition includes: A E-Link module, a floppy disk or compact disc (establishment and application software), a communication interface cable (module and serial port equipment correspondence) and a technical manual.
3.2 E-Link data transmitter’s contour
E-Link data transmitter’s contour as shown in Figure 1. And Jl is the power source connection. Meets AC7V~12V or: DC9V~15V; J2 is the equipment interface, is 9 needle DB9 plug, the RS232 level; J3 is the RJ-45 mesh wire plug, receives HUB or on the data switchboard through the mesh wire; J4 is the programmer port, uses for to promote in the monolithic integrated circuit the procedure to realize the different function, like RS232_rIEP/IP transforms, WebServer, A/D long range data gathering and the HTTPD control and so on.

3.3 parameter establishment connection
The E-Link operational parameter’s establishment and the performance test complete through PC. With the E-Link correspondence interface cable which provides stochastically the PC COM serial port and the E_Link J2 port is connected. On the E-Link J3 port uses RJ45 and the ethernet is connected. The E-Link power source may supply through the J1 plug outside, the external power supply is 15 V direct-current power supplies. A E Link parameter establishment and the performance test need to move the establishment software on PC. Connection mode as shown in Figure 2.

3.4 application system’s connection
The so-called application system connection, is refers to under the practical application condition user’s serial port equipment through the E-Link surfer way connection. Serial port equipment available RS232. RS485, RS422 and the CAN main line 4 ways and E-Link are connected, as shown in Figure 3.

The E_Link data transmitter may also with the monolithic integrated circuit system direct connection, as a monolithic integrated circuit system’s part, as shown in Figure 4.

4 software systems
4.1 software designs
Uses the standard the TCP/IP agreement. Because any can access the net the computer uses this agreement. If wants the long-distance transmission data, may use ready-made WindoWS under the SOCKET function or the Linux network function programs directly, realizes PC to the E-Link data transmission.
4.2 networks and E-Link
What the E-Link data transmitter uses is the TCP/IP agreement, the internal agreement has TCP, UDP, IP, ARP and the simple application layer processing agreement. The upper formation software may use in VB, the VC general SOCKET function. But must pay attention selects UDP and TCP. Should avoid in a webpage presenting the same IP address and the physical address.
May give E Link from the network to transmit two types the data; One kind is establishes the data: One kind is transmits through E-Link to the serial port data.
(1) establishes the package
The upper formation may establish E-Link the password, the board card IP address, the gateway IP address and the board card physical address (password establishment is to not guarantee by distortion). May use the special serial port monitor routine to carry on the establishment. May also use the super terminal software which Windows 9x/NT/2000 provides to carry on the establishment. If in the network has the DHCP server. May let it establish voluntarily. The transfer system data carries on the establishment for E-Link, E-Link to oneself, does not deliver the data the serial port.
E-Link must initialize. The initialization data format to establish 4 passwords, the IP addresses, the gateway address and the physical address. If has not been established, its initialization data in X5045 for {\ S ‘, \ ‘ E \ ‘ E \ ‘, \ E
‘ T \ ‘, \ ‘ O, \ ‘ K \ ‘, \ ‘ O \ ‘, \ ‘ O \ ‘ \ ‘, \ ‘ O \ ‘ ‘, 192,168,0,8,20,192,168,0,159, O,192,168, O,8,36}.
Reset IP time, should better use and in the E-Link IP address identical webpage main engine establishes to it. For instance the 192.168.0.XXX. establishment form is as follows:
Password establishment - ” SETSMM: ” (7) old password (4) new password (4),15 byte;
IP establishment - ” SETSIP: ” (7) password (4) new IP(4),15 byte:
Gateway establishment - ” SETSGT: ” (7) password (4) new GATE(4),15 byte;
Physical address establishment - ” SETSMA: ” (7) password (4) new physical address (61,17 bytes.
Below is the IP establishment data packet which must transmit (in VB):
Dim IpSet (1 To 151 As Byt \ ‘ string of character
IPSSet(1)=&H53 ‘ \ ‘ S, ‘
IoSet(2)=&H45 \ ‘ \ ‘ E, ‘
IpSet (31=&H54 \ ‘ \ ‘ \ ‘ T \ ‘
IPSet(4)=&H53 \ ‘ \ ‘ S \ ‘
IpSet(5)&ti49 \ ‘ \ ‘ n
It, Set(6)=&H50 \ ‘ \ ‘ P ‘
IpSet(7)=&H3A \ ‘ \ ‘: \ ‘
\ ‘ password
IpSet (81=&H38 ‘ \ ‘ 0 ‘
IpSet(9)=&H38 \ ‘ \ ‘ O \ ‘
IpSet(10)=&H38 \ ‘ \ ‘ 0 \ ‘
IpSet(11)=&H38 \ ‘ \ ‘ 0 \ ‘
\ ‘ IP address
IpSet(12)=192
IpSet(13)=168
IpSet(14)=0
IpSet(15)=8
Establishes successfully, E-Link returns data
{l ‘ S \ ‘, \ ‘ E \ ‘, \ ‘ T \ ‘, \ ‘ st ‘, \ ‘ B \ ‘, \ ‘ E \ ‘, \ ‘ O \ ‘, \ ‘ K \ ‘, Oxod, Oxoa};
The transfer system package carries on the establishment for E-Link, E-Link to oneself, does not deliver the data the serial port.
(2) transmission data packet
If establishes the package. Then after E-Link UDP/TCP data packet receive. Takes out the UDP/TCP in data part. And sends out through the serial port. Communication protocol use standard RS232, RS422 or RS485. In network data transmission, because RTL8019AS internal RAM is limited. Should better not take a transmission to surpass 4500 bytes data, otherwise possible to overflow. If a E Link processing speed is not very quick or network card’s reason has the overflow, then E-Link returns burst f \ ‘ O \ ‘, \ ‘ V \ ‘, \ ‘ E \ ‘ \ ‘ R \ ‘, \ ‘ L \ ‘, \ ‘ O \ ‘, \ ‘ W \ ‘, OxOd, OxOal, and gets rid in the memory block the data packet.
4.3 serial ports and E-Link
(Also has not been possible to establish conclusion symbol the serial port to the E-Link fixed conclusion symbol, for example 0×0A and 0×0D and so on), add on the time in the serial port data transfer the control, when after the last data transmission completes 20 ms, E-Link thought that the data receive ended, and carried on processing to the data packet. When the receive buffer receives data E-Link to carry on processing every time to the data packet, backstage transmission. If the data are many. Should increase the receive buffer suitably the capacity, avoids the data overflow creating the loss.
In ordinary circumstances. The lower position machine basis recent one time receives IP and the port return to the data. For instance a previous IP address is 192.168.0.159, the port is 8000 data packets comes, and by the E-Link transmission for serial port, if the serial port comes the data, then still returned to this IP and the port.
If the lower position confidential achievement initiative side transmits to goal IP, must first send one ” SETSIP: ” IP address (total llbytes) burst. E-Link inquires this IP physical address to the network. If succeeds returns to burst f \ ‘ S \ ‘, \ ‘ E \ ‘, \ 1 ‘, \ ‘, S \ ‘, ‘ B \ ‘, E \ ‘, \ ‘ 0 \ ‘, \ ‘ K \ ‘, 0xod,0xOa}, when the serial port receives this burst, may transmit the data packet, after obtaining the data, E-Link according to the physical address which and goal IP applies transmits this data packet, the port uses 8000.
To the serial port preparation’s data space is 10 KB, does not take a transmission to surpass 10 KB the data, will otherwise have I \ ‘ O \ ‘, \ ‘ V \ ‘, \ ‘ E \ ‘, \ ‘ R \ ‘, \ ‘ L \ ‘, \ ‘ O \ ‘, \ ‘ W \ ‘, 0xod,0xoa, the burst returns, and will get rid of this data packet.
5 concluding remark
The E-link data transmitter may apply in the industrial automation system, the telecommunication communications system, the long-distance dispersion-like device control, the intelligent auto-alarm and the fire prevention interlock system and the intelligent plot building automatic control system and so on. The E-Link network data transmitter may also use in constructing new generation’s ethernet observation system. With transforms existing the distributional control system which and the development production network observation equipment is composed of the field bus. It will promote the domestic electric appliances intellectualization and the network. And causes people’s life style to have the deep transformation.