关注官方微信

中文.

Products

Products

Introduction of Serial Port Networking Modules Usage

Date:2009-04-16 Author:Shanghai ZLAN Views:4275

Abstract:this paper introduces the definition, use, usage and performance of serial port networking module.

1. What is the serial port networking module

The serial port is familiar to electronic engineers, Serial, UART, RS232, EIA-RS-232C and COM are all serial names. Due to its using less pin (only two wire RXD, TXD) and simple protocol, serial port is widely used in data transmission of electronic devices, it is a common phenomenon that electronic devices communicate with PC via serial port, or do external data expansion through serial port.

The advent of the Internet era requires that electronic devices are also need to connect to the Internet, so it is most appropriate to use a serial port to Ethernet when a device needs to be connected to Ethernet. The so-called serial port networking module is an electronic unit module which converts the serial port communication of MCU into Ethernet communication.

The following is a series of serial port networking modules in Shanghai ZLAN information technology:

2. Usage of serial port networking module

In essence, serial port networking module is a serial port to Ethernet (TCP/IP) protocol converter. Using the serial port networking module can free users from the complex embedded TCP/IP code. It is convenient to realize the embedded networking, on the other hand, it can guarantee the stability of the network.

3. Usage of serial port networking module
3.1 serial port to Ethernet function

In general, the serial port networking module itself has no RJ45 interface. In this way, the serial port networking module can be connected to the user's PCB, and the user can select the location of the RJ45 interface as needed. Module pins can be directly connected to the RJ45 interface. In terms of serial port, the user SCM connect with the RXD and TXD pin of serial port networking module. Since then, the serial port data sent by the user is sent to the network, and the data received by the network is received from the serial port. You may also need to provide RTS and CTS flow control pins for situations that require hardware flow control.

3.2 Parameter setting

In the function of serial port to Ethernet, it is necessary to solve the problem of the destination IP address will be sent to, as which computer will the data be sent to when the serial port data turns into network data? So you have to set the destination IP. In addition to the destination IP address, the serial networking module has many parameters, such as destination port, serial port rate, working mode, etc.

Generally modifying parameters in two ways: (1) login serial networking module via the Web, this approach requires the serial port networking module and the PC operating browser must be in the same logical subnet. (2) some serial port networking modules provide Window tools that can instantly search and modify all the parameters of serial port networking modules in the network.

3.3 Management of networking modules

Serial port networking modules may be widely distributed in the network. Users can't remember the IP address of each module one by one. The serial port networking module should provide a set of Windows tools that can quickly find all networking modules on the network and can set parameters and manage them.

3.4 How to communicate with the serial port networking module in PC

Serial port networking module actually only solved the function of serial data converting to Ethernet data for embedded device, but how does the PC (the PC responsible for receiving network data) receive and process the data? There are basically three methods:
1). Direct socket communication: the user directly calls the socket API function through the Windows network programming, and communicates with the serial port network module through UDP, TCP/IP protocol. This method requires users to have a certain network programming basis.
2). Virtual serial port: this introduces a new concept virtual serial port. Virtual serial port is different with hardware serial port, the hardware serial port is the COM port already existing on the computer, such as COM1, COM2. The virtual serial port is using Windows virtual device technology to virtually create a serial port at the bottom, it can be used like hardware serial port from the upper software. Such as the PC software attached to the serial port networking module virtually create a COM5, and then bind COM5 with a serial port networking module, then the user software can read and write COM5 to implement the communication with serial port networking module.
3). Device management function library DLL: the serial port networking module can generally provide a Windows dynamic link library, which can communicate directly with the serial port network module through the functions provided by the link library.

4. Performance indicators of serial port networking module

1). Stability of data forwarding: stability is the most important index of serial port networking module. The first step is to maintain the stability of the connection in various communication situations. Second, ensure that no data is lost, no transmission errors. The design of serial port networking module, should be able to support full duplex communication, uninterrupted transmission of data without dropping packets. This will enable such modules to be capable of communicating with any traffic situation.

2). Data sending-response time: the speed indicate the time difference that sending data from PC, through a serial port networking module, forwarded to the device, the device answer, then through a serial port networking device forwarding, back to the PC. This speed reflects the running speed of the serial port networking module.

3). Abundant parameters configuration: in addition to the basic parameters such as the destination IP, baud rate, the serial port networking module should have more abundant parameters that can be configured to adapt to different applications.

4). A variety of ways to modify parameters: the general serial port networking module can only modify the parameters through the network, such as through a Web server, or through PC specific management tool. The serial port networking module should be able to support modifying module parameters through serial port at the end of MCU.