Introduction
In view of the fact that the original RS232 and RS485 serial port devices are no longer adapted to the pace of informatization. The transformation from serial port to network port, from level-level serial port communication to Ethernet or even Internet-based network-level communication is an inevitable trend. Equipment networking management has the advantages of strong flexibility, remote control, and interface standardization. The common method of adding network port connection to embedded devices is to add Ethernet control chips and interfaces to the hardware circuit. However, these chips usually have more than 100 pins and require a deep understanding of the hardware structure and network communication protocol of the chip, or design the TCP/IP protocol stack and network control terminal by yourself, which has a high technical threshold. For users who are not familiar with network communication protocols, want to add network interfaces to embedded devices, and do not want to change the original hardware structure, using a product that does not require knowledge of network interfaces to convert network and serial communications is undoubtedly a better solution. To this end, this paper proposes a solution for adding network interfaces to user embedded devices using the IPort-1 module. Users can add network ports to their embedded devices without modifying the original hardware circuit without knowing the network protocol and control interface. Therefore, it is a convenient and easy embedded device network solution.
1 Structure and Function of IPort-1 Module
IPort-1 module is a multifunctional embedded Ethernet serial port data conversion module developed by Guangzhou Zhiyuan Electronics Co., Ltd. It integrates TCP/IP protocol stack. It can easily complete the network function of embedded devices. IPort-1 module integrates 10/100M adaptive Ethernet interface, the highest baud rate of serial communication is up to 230.4 kbps, and has multiple working modes such as TCP Server, TCP Client, UDP and Real COM driver. It can support up to four connections and support domain name access and other functions.
The pin definition of IPort-1 module is shown in Figure 1. The module has 16 pins, including 3 input pins, 3 output pins and 1 IO port. These ports correspond to different working modes and have different input or output functions.
2 Real COM Mode Application of IPort-1 Module
In Real COM mode, a background service program running on the host computer will actively connect to the IPort-1 module and add a serial port on the PC side. This serial port is the serial port of the IPort-1 module. Generally, after ensuring that the hardware is connected, the network parameters such as IP address, subnet mask and gateway should be set for the PC first. The parameters must be set in the same network segment as the IPox-1 module. The default IP address of the IPort-1 Ethernet to serial port module is: 192.168.0.178. Secondly, the ZNetCom software that comes with the module can be used to obtain device configuration information, and parameters such as working mode and serial port baud rate can be set. Finally, the ZNetManager software can be used to start the service for communication.
Figure 2 shows the circuit connection diagram of the IPort-1 module and the CAN module. As can be seen from Figure 2, when the IPort-1 module communicates with other devices with UART interfaces. Just connect the TXD of the IPort-1 module to the RXD of the device, and connect the RXD of the IPort-1 module to the TXD of the device. The circuit connection is very simple.
Figure 3 is the debugging result of the communication process between the IPort-1 module and the CAN module.
3 Other working modes
In addition to the Real COM mode, the IPort-1 module also has three working modes: TCPServeY, TCP Client, and UDP. In the TCPServer working mode, the IPort-1 module will not actively connect to other devices, but always wait for the connection of the client (TCP Client). After establishing a TCP connection with the client, two-way data communication can be carried out. In the TCP Client mode, the IPort-1 module will actively connect to the pre-set TCP server. If the connection is unsuccessful, the client will continue to try to establish a connection with the TCP server according to the set connection conditions. After establishing a TCP connection with the TCP server, two-way data communication can be carried out. Unlike the TCP protocol used in the above modes, the UDP mode uses the UDP protocol for data communication. UDP is a non-connection-based communication method. It cannot guarantee that the data packets sent to the target host are correctly received. Therefore, in situations where reliability is required, it is generally necessary to use the upper-layer communication protocol to ensure the correctness of the data; however, because UDP is a simpler communication method, it will not increase too much additional communication volume. At the same time, it can also provide a higher communication speed than TCP to ensure the real-time nature of the data packets. In fact, when the network environment is relatively simple and the network communication load is not too large, the UDP working method is not prone to errors. The status of devices working in this way is equal, and there is no server and client.
4 Conclusion
Using the IPort-1 module allows users to easily add network interfaces to embedded devices without understanding the network communication protocol and its internal hardware structure, and there is no need to change the original hardware structure of the circuit. Therefore, it is a convenient and easy embedded device network solution.
Previous article:Research on power of solar power generation control system based on ARM
Next article:Ethernet Applications Based on ARM Core Embedded Microprocessors
Recommended ReadingLatest update time:2024-11-16 16:44
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to use Bluetooth 4.2 to implement the Internet of Things
- What can the PG pin of CH221K be used for?
- Design of DDS multi-channel signal source based on FPGA.pdf
- AMEYA360 design solution | Intelligent LED lighting solution based on TI
- How to save data on pyboard without memory card, so that it doesn't matter if the power is off
- STM32 LCD driver writing ideas, with code analysis
- Please help me with the question of setting up the opencl environment
- Common solutions for J-Link failing to connect to the chip
- Arteli AT32F4xx Standard Peripheral Library Release Notes
- AD 3D component package library