Difference between revisions of "Template:2-CH UART TO ETH Spec"
(Created page with "==Features== *Embedded Ethernet MAC and PHY layers *Bi-direction transparent data transmission between UART and Ethernet *10/100M, full-duplex/half-duplex auto-negotiation Eth...") |
|||
Line 67: | Line 67: | ||
*Clearing buffer: Never | *Clearing buffer: Never | ||
− | |||
==TCP CLIENT== | ==TCP CLIENT== | ||
− | + | 1. Select SSCOM to select the protocol type as TCPServre, and then view the target IP and target port number through SSCOM (that is, 1 and 2 in the figure)<br /> | |
− | [[File:SSCOM-1.jpg| | + | [[File:SSCOM-1.jpg|800px]]<br /> |
− | + | 2. Run NetModuleConfig.exe to set the module parameters, as follows:<br /> | |
− | (1). | + | (1). Click "Search Device", the device list will show the modules in the subnet;<br /> |
− | (2). | + | (2). Double-click the module in the device list, modify the parameters on the left, and then click "Configure Device Parameters";<br /> |
− | (3). | + | (3). After the configuration is completed, the module will restart, wait a while, click "Search Device", find the module, and view the configuration result. <br /> |
− | (4). | + | (4). Modify the module parameters according to actual needs, for example: set the network mode to TCP CLIENT, destination IP, destination port and TCP SERVER<br /> |
− | IP | + | The IP and port are the same, and then modify the baud rate and other parameters as required. Then click Configure Device Parameters. <br /> |
[[File:NetModuleConfig-1.jpg|800px]]<br /> | [[File:NetModuleConfig-1.jpg|800px]]<br /> | ||
− | + | 3. After the configuration is complete, click on SSCOM to connect to it. <br /> | |
[[File:SSCOM-2.jpg|800px]]<br /> | [[File:SSCOM-2.jpg|800px]]<br /> | ||
==TCP SERVER== | ==TCP SERVER== | ||
− | + | 1. Run NetModuleConfig.exe to set the module parameters, as follows:<br /> | |
− | (1). | + | (1). Click "Search Device", the device list will show the modules in the subnet;<br /> |
− | (2). | + | (2). Double-click the module in the device list, modify the network mode to TCPServre on the left, then modify the module parameters as required, and finally click "Configure Device Parameters";<br /> |
[[File:NetModuleConfig-2.jpg|800px]]<br /> | [[File:NetModuleConfig-2.jpg|800px]]<br /> | ||
− | + | 2. Connect to the module configured as TCP SERVER through SSCOM, the connection will be shown as follows:<br /> | |
[[File:SSCOM-3.jpg|800px]]<br /> | [[File:SSCOM-3.jpg|800px]]<br /> | ||
==UDP CLIENT/SERVER== | ==UDP CLIENT/SERVER== | ||
− | + | 1. Run NetModuleConfig.exe to set the module parameters, as follows:<br /> | |
− | (1). | + | (1). Click "Search Device", the device list will show the modules in the subnet;<br /> |
− | (2). | + | (2). Double-click the module in the device list, modify the network mode to UDP CLIENT/Servre on the left, then modify the module parameters as required, and finally click "Configure Device Parameters";<br /> |
[[File:NetModuleConfig-3.jpg|800px]]<br /> | [[File:NetModuleConfig-3.jpg|800px]]<br /> | ||
− | + | 2. Connect the module configured as UDP CLIENT/Servre through SSCOM (the UDP mode of SSCOM will automatically connect, no matter your mode is configured as CLIENT/Servre), the connection will be shown as follows:<br /> | |
[[File:SSCOM-4.jpg|800px]]<br /> | [[File:SSCOM-4.jpg|800px]]<br /> | ||
− |
Revision as of 07:29, 16 September 2021
Features
- Embedded Ethernet MAC and PHY layers
- Bi-direction transparent data transmission between UART and Ethernet
- 10/100M, full-duplex/half-duplex auto-negotiation Ethernet interface, 802.3-compliant
- Auto-MDI/MDIX, detect and switch cable type automatically
- Supports DHCP auto-obtained IP and DNS domain access
- Network parameter configuration like chip operating mode, port, IP, via host computer software or UART command
- Four operating modes: TCP CLIENT, TCP SERVER, UDP CLIENT, UDP SERVER
- 2-CH UART concurrent operation, standalone transparent transmission for each channel
- Full-duplex or half-duplex UART communication supports RS485 RX/TX auto switch
- Supports virtual serial port software (provided)
- KEEPALIVE mechanism support
Specifications
- Operating voltage:3.3V/5V
- Operating current: 140mA
- Operating mode: TCP/UDP
- UART baud rate: 300bps !921.6Kbps
- UART TTL level: 3.3V/5V compatible
- Storage temperature: -55°C ~ 125°C
- Operating temperature: -40°C ~ 85°C
- Dimensions: 53.00 x 22.00mm
Pinout
5V/3V3 | power positive, use any pin of 5V/3.3V pins for power supply |
GND | ground |
RST1 | external reset input, low active |
RESET | restore to factory setting, detected when chip power on, low active |
TXD1 | asynchronous UART 1 data output (enabled by default) |
TXD2 | asynchronous UART 2 data output (disabled by default) |
RXD1 | asynchronous UART 1 data input (enabled by default) |
RXD2 | asynchronous UART 2 data input (disabled by default) |
CFG0 | UART config mode, low level to enter configuration, high level to exit configuration |
RUN | Operating status indicating pin |
DIR1 | UART 1 RS485 RX/TX switch (connects to external RS485 controller) |
DIR2 | UART 2 RS485 RX/TX switch (connects to external RS485 controller) |
CH9121
CH9121 is a network serial port transparent transmission chip, which can realize the two-way transparent transmission of serial data and network data. It supports 4 working modes of TCP CLIENT/SERVER, UDP CLIENT/SERVER, and the serial port baud rate support range is 300bps~921600bps, which needs to be configured before use. The host computer software NetModuleConfig.exe or serial command configures the network parameters and serial parameters of the chip. After the configuration is completed, CH9121 will saves the configuration parameters to the internal storage space. After the chip is reset, CH9121 will work according to the saved configuration values.
Default configuration
The UART2 is disabled, UART1 works in TCP CLIENT mode by default. The default setting of ETH is as below:
- Device IP:192.168.1.200
- Subnet Mask: 255.255.255.0
- Gateway: 192.168.1.1
- Device Port: 2000
- Target IP: 192.168.1.100
- Target port: 1000
The default setting of the UART1 is as below:
- Baud rate: 9600
- Timeout: 0
- data bit: 8
- Stop bit: 1
- Parity: None
- Clearing buffer: Never
TCP CLIENT
1. Select SSCOM to select the protocol type as TCPServre, and then view the target IP and target port number through SSCOM (that is, 1 and 2 in the figure)
2. Run NetModuleConfig.exe to set the module parameters, as follows:
(1). Click "Search Device", the device list will show the modules in the subnet;
(2). Double-click the module in the device list, modify the parameters on the left, and then click "Configure Device Parameters";
(3). After the configuration is completed, the module will restart, wait a while, click "Search Device", find the module, and view the configuration result.
(4). Modify the module parameters according to actual needs, for example: set the network mode to TCP CLIENT, destination IP, destination port and TCP SERVER
The IP and port are the same, and then modify the baud rate and other parameters as required. Then click Configure Device Parameters.
3. After the configuration is complete, click on SSCOM to connect to it.
TCP SERVER
1. Run NetModuleConfig.exe to set the module parameters, as follows:
(1). Click "Search Device", the device list will show the modules in the subnet;
(2). Double-click the module in the device list, modify the network mode to TCPServre on the left, then modify the module parameters as required, and finally click "Configure Device Parameters";
2. Connect to the module configured as TCP SERVER through SSCOM, the connection will be shown as follows:
UDP CLIENT/SERVER
1. Run NetModuleConfig.exe to set the module parameters, as follows:
(1). Click "Search Device", the device list will show the modules in the subnet;
(2). Double-click the module in the device list, modify the network mode to UDP CLIENT/Servre on the left, then modify the module parameters as required, and finally click "Configure Device Parameters";
2. Connect the module configured as UDP CLIENT/Servre through SSCOM (the UDP mode of SSCOM will automatically connect, no matter your mode is configured as CLIENT/Servre), the connection will be shown as follows: