For a long time, RS232 has been used as a connector between DTE (Data Terminal Equipment) and DCE (Data Circuit-terminating Equipment) in the field of communication. Since the advent of the PC, RS232 has become the standard for serial communication. Serial communication is still widely used today. With the rapid development of the Internet, the TCP/IP protocol has become the most widely used communication protocol. Recently, due to the continuous growth of the Internet environment, there has been a higher demand for communication connections between the Internet and serial communication devices. If the Ethernet and RS232 connections are successful, people can control the serial devices over Ethernet. At the same time, various serial devices can communicate effectively with Ethernet. In this document, we will use the iMCU7100EVB to implement serial to Ethernet functionality, as well as a simple application of some tools. Figure 2.1 Serial to Ethernet Converter with W7100A The iMCU7100EVB can implement a 'serial to Ethernet converter' without additional equipment, because the iMCU7100EVB contains one RJ45, RS232 and one W7100A chip. In this document, use the 'Serial to Ethernet function' to send/receive information between serial devices and Ethernet devices. For more information on the serial port, please refer to 'How to use the UART of the W7100A'. Meanwhile, for details on Ethernet, see 'How to implement TCP for W7100A' and 'How to implement UDP for W7100A'. This section will demonstrate 'Serial to Ethernet' with TCP server functionality. The iMCU7100EVB acts as a TCP server with a serial interface in the demo. The device terminal is a 'serial to Ethernet' demo program; the device terminal program has a serial interface and an Ethernet interface, and both can be tested simultaneously. Users can download the device terminal program from WIZnet's homepage and click 'Library' => 'Download Center'. First, connect the iMCU7100EVB to a PC using an Ethernet cable and a serial cable. The PC functions as an Ethernet device and as a serial device. For more details, please refer to the 'iMCUW7100EVB User Guide'. After the iMCUW7100EVB is connected to the PC, power on the iMCUW7100EVB. Download the attachment 'serial to Ethernet.HEX file' to iMCUW7100EVB using the 'W7100 debugger' program or the 'WizISP' program. Please refer to the instructions in the 'iMCU7100A Debugger Guide' and the 'W7100A WizISP Program User Guide'. As shown in Figure 3.1, (a) is the iMCU7100A Debugger program, and (b) is the WizISP program. Figure 3.1 W7100A Debugger program and WizISP program Figure 3.2 Device terminal settings After burning the HEX file on the iMCU7100EVB board, open the device terminal program (reset the development board). As shown in Figure 3.3, configure the parameters of the device terminal. It should be noted that the serial port number needs to be configured according to the actual serial port number of the user's PC. In this demo, the serial baud rate of the iMCU7100EVB is 230400, so the baud rate of the Device Terminal should also be set to 230400. If the user has modified the program code associated with the baud rate, use the modified baud rate. For details on the baud rate, refer to the 'How to use the serial interface of the W7100A' document. Perform network configuration below. First, the Server Mode is not selected, but this option is selected when the iMCU7100EVB is acting as a TCP client and the PC is operating as a TCP server. According to the configured IP address of the iMCU7100EVB, it is 192.168.1.2. The change of the IP address can also be implemented by code, and the modified IP address is used in the device terminal program. The default port number is 5000. After all the configurations in the device terminal program are completed, click on the serial communication window. 'OPEN' and 'CONNECT' in the network communication window to implement the connection process with the development board. Reset the development board. If the connection is successful, a message will appear in the serial and network information window, then click 'SEND', or use the Enter key to check if 'Serial to Ethernet' can communicate. Figure 2.4 indicates this process. Type any information in the serial information window, click SEND or press Enter. Then the Ethernet dialog window will appear with the information you typed before. The same process will also appear in the serial dialog window. Figure 3.3 Serial to Ethernet chat test under device terminal You can use the device terminal to send any document information; click 'File send', 'Document open window' will appear. The sent document will be saved in the folder of the device terminal. However, if the document was sent over Ethernet, the contents of the document will be displayed in the serial dialog window. This is because the transmission speed of TCP is faster than the serial transmission speed, and the transmission speed of serial documents is determined by the serial baud rate. Figure 3.4 Sending a serial to Ethernet file using the device terminal program Conecting Terminals Without Screws Conecting Terminals Without Screws,Cold Pressing Terminals,Low Pressure Cold Shrinkage Terminal,Cold Shrinkage Cable Terminals Taixing Longyi Terminals Co.,Ltd. , https://www.lycopperlugs.com 1 Introduction
2. The basic structure of serial to Ethernet
3. Serial to Ethernet Demo