임베디드 보드

CH9121 HCW 이더넷 모듈

ZEROWIN.TECH 2020. 10. 8. 22:48
728x90

UART 통신을 이용하여 이더넷 통신을 할 수 있습니다.

AT COMMAND를 이용하여 네트워크 세팅을 할 수 있습니다.

당연, 피시프로그램을 이용해서 네트워크 세팅이 가능합니다.

아두이노, STM32 에서 UART를 이용하여 쉽게 이더넷을 이용할 수 있습니다.

 

NetModuleConfig.zip
0.02MB
H2_ETH-01.pdf
1.03MB

NetModuleConfig.exe 관리자 권한으로 프로그램을 실행하세요.

UART 을 이용하여 이더넷 통신을 합니다.

테스트영상

youtu.be/quLry0NtA8Y

 

STM32 DK 개발용 보드를 이용하여 전체 동작 플로우를 체크합니다.

좀 복잡하지요, 풀테스트를 위해 하나씩 확인합니다.

 

 

CH9121 is a network serial port transparent transmission chip. CH9121 integrates TCP/IP protocol stack, which can realize network data packet and string
Two-way transparent transmission of port data, with 4 types of work: TCP CLIENT, TCP SERVER, UDP CLIENT, and UDP SERVER
Mode, the serial port baud rate can support up to 921600bps, which can be easily configured through the host computer software or serial commands, which is convenient and fast
Czech Republic.
The following figure is the general application block diagram of CH9121.

 

 

user
equipment,
As single
Film machine,
Embed
Style
Uniform

 

computer
Industrial Control
Machine
equipment

 

2. Features
 
Built-in Ethernet media transport layer (MAC) and physical layer (PHY)
Realize two-way transparent transmission of serial data and network data
Support 10/100M, full-duplex/half-duplex adaptive Ethernet interface, compatible with 802.3 protocol
Support MDI /MDI X line automatic conversion
Support DHCP to automatically obtain IP address, support DNS domain name access
Set the chip working mode, port, I P and other network parameters through the host computer software and serial port commands
Working mode supports TCP CLI ENT, TCP SERVER and UDP CLI ENT, UDP SERVER 4 modes
Support up to two independent serial ports at the same time, independent transparent transmission
Serial port baud rate supports 300bps ~ 921600bps
Serial port TTL level, compatible with 3.3V and 5V
The serial port supports full-duplex and half-duplex serial communication, and supports automatic switching of RS485 transceiver
Support and provide virtual serial port software
Support KEEPALI VE mechanism

 

2. 특징
 
내장 이더넷 MAC (미디어 전송 계층) 및 PHY (물리 계층)
직렬 데이터 및 네트워크 데이터의 양방향 투명 전송 실현
802.3 프로토콜과 호환되는 10 / 100M, 전이중 / 반이중 적응 형 이더넷 인터페이스 지원
MDI / MDI X 라인 자동 변환 지원
자동으로 IP 주소를 얻기 위해 DHCP 지원, DNS 도메인 이름 액세스 지원
호스트 컴퓨터 소프트웨어 및 직렬 포트 명령을 통해 칩 작동 모드, 포트, IP 및 기타 네트워크 매개 변수를 설정합니다.
작업 모드는 TCP CLI ENT, TCP SERVER 및 UDP CLI ENT, UDP SERVER 4 모드를 지원합니다.
동시에 최대 2 개의 독립적 인 직렬 포트 지원, 독립적 인 투명 전송
직렬 포트 전송 속도는 300bps ~ 921600bps를 지원합니다.
3.3V 및 5V와 호환되는 직렬 포트 TTL 레벨
직렬 포트는 전이중 및 반이중 직렬 통신을 지원하고 RS485 트랜시버의 자동 전환을 지원합니다.
가상 직렬 포트 소프트웨어 지원 및 제공
KEEPALI VE 메커니즘 지원

 

CH9121 is a network serial port transparent transmission chip, which can realize two-way transparent transmission of serial port data and network data, and supports TCP
CLEI NT/SERVER, UDP CLI ENT/SERVER 4 working modes, the serial port baud rate support range is 300bps~921600bps,
Before use, you need to configure the network parameters and serial port parameters of the chip through the host computer software Net Modul eConf i g. exe or serial port commands.
After the configuration is completed, CH9121 saves the configuration parameters to the internal storage space. After the chip is reset, CH9121 will work according to the saved configuration values.
Made.
The basic parameters of CH9121 include: name, MAC address display, automatic IP address setting, manual IP address setting
(Including CH9121 IP address, subnet mask, default gateway), serial port negotiation configuration.

 

CH9121은 네트워크 직렬 포트 투명 전송 칩으로 직렬 포트 데이터 및 네트워크 데이터의 양방향 투명 전송을 실현할 수 있으며 TCP를 지원합니다.
CLEI NT / SERVER, UDP CLI ENT ​​/ SERVER 4 작업 모드, 직렬 포트 전송 속도 지원 범위는 300bps ~ 921600bps,
사용하기 전에 호스트 컴퓨터 소프트웨어 Net Modul eConf i g. exe 또는 직렬 포트 명령을 통해 칩의 네트워크 매개 변수 및 직렬 포트 매개 변수를 구성해야합니다.
구성이 완료되면 CH9121은 구성 매개 변수를 내부 저장 공간에 저장하고 칩이 재설정 된 후 CH9121은 저장된 구성 값에 따라 작동합니다.
만든.
CH9121의 기본 매개 변수에는 이름, MAC 주소 표시, 자동 IP 주소 설정, 수동 IP 주소 설정이 포함됩니다.
(CH9121 IP 주소, 서브넷 마스크, 기본 게이트웨이 포함), 직렬 포트 협상 구성.

 

The name is mainly used to facilitate the management of the CH9121 module in the LAN. The length does not exceed 20 bytes. The MAC address column displays the current
The MAC address of the previously selected module, CH9121 has two ways to set network parameters, 1) DHCP, that is, automatically
The functional gateway device obtains network parameters; 2) Manually set. The serial port negotiation configuration function refers to the way to enter through the serial port handshake
The serial port configuration mode is closed by default.
The CH9121 port parameters include: network mode, local port, target IP/domain name, destination port, serial port baud rate/
Data bit/stop bit/check bit, network cable disconnection processing, RX packet length, RX packet timeout interval, operation during network connection.
Network mode (TCP SERVER/CLI ENT, UDP SERVER/CLI ENT), destination IP address, local/destination port is network
The basic parameters of network communication, the destination IP address can also be accessed by domain name; the serial port baud rate range is
300bps ~ 921600bps (The baud rate error of the serial port sending signal is less than 0.3%, the allowable baud rate error of the serial port receiving signal
Not less than 2%), supports 5, 6, 7 or 8 data bits and 1 or 2 stop bits, supports odd, even, no parity, and empty
White 0, mark 1 verification method; network cable disconnection processing means that when the network cable is disconnected, CH9121 actively closes the connection or does not use
Take any action; the RX packet length range is 1~1024, which means when the CH9121 serial port receives data length reaches the set length,
CH9121 will immediately pack the serial port data and send it out through the network; the timeout time setting range is 0~200, and the unit of timeout is
It is about 5ms. For example, when the timeout is 1, when the data length of the serial port receiving buffer does not reach the length of the RX packet, and the serial port is over
If no new data is received within 5ms, a serial port timeout will occur. After the serial port timeout occurs, CH9121 will receive the serial port
The data is sent out through the network. When the timeout time is set to 0, the internal hardware timeout is enabled (no new data is received for more than 4 data time)
According to the mechanism, it is suitable for occasions with high real-time requirements and large-volume data sending and receiving; the setting of clearing the serial port buffer means: network connection
Before the connection is established, how to deal with the data received by the serial port? When the TCP connection is cleared (discarded), or kept.

 

이름은 주로 LAN에서 CH9121 모듈의 관리를 용이하게하는 데 사용됩니다. 길이는 20 바이트를 초과하지 않습니다. MAC 주소 열에는 현재
이전에 선택한 모듈 CH9121의 MAC 주소에는 네트워크 매개 변수를 설정하는 두 가지 방법이 있습니다. 1) DHCP, 즉 자동으로
기능 게이트웨이 장치는 네트워크 매개 변수를 얻습니다 .2) 수동 설정. 직렬 포트 협상 구성 기능은 직렬 포트 핸드 셰이크를 통해 입력하는 방법을 나타냅니다.
직렬 포트 구성 모드는 기본적으로 닫혀 있습니다.
CH9121 포트 매개 변수에는 네트워크 모드, 로컬 포트, 대상 IP / 도메인 이름, 대상 포트, 직렬 포트 전송 속도 /
데이터 비트 / 정지 비트 / 체크 비트, 네트워크 케이블 연결 해제 처리, RX 패킷 길이, RX 패킷 타임 아웃 간격, 네트워크 연결 중 작동.
네트워크 모드 (TCP SERVER / CLI ENT, UDP SERVER / CLI ENT), 대상 IP 주소, 로컬 / 대상 포트는 네트워크입니다.
네트워크 통신의 기본 매개 변수 인 대상 IP 주소는 도메인 이름으로도 액세스 할 수 있습니다. 직렬 포트 전송 속도 범위는 다음과 같습니다.
300bps ~ 921600bps (시리얼 포트 전송 신호의 전송 속도 오류는 0.3 % 미만, 신호 수신 신호의 허용 전송 속도 오류
2 % 이상), 5, 6, 7 또는 8 데이터 비트 및 1 또는 2 정지 비트 지원, 홀수, 짝수, 패리티 없음 및 비어 있음
흰색 0, 마크 1 확인 방법, 네트워크 케이블 분리 처리는 네트워크 케이블이 분리되면 CH9121이 능동적으로 연결을 닫거나 사용하지 않음을 의미합니다.
조치를 취하십시오. RX 패킷 길이 범위는 1 ~ 1024입니다. 즉, CH9121 직렬 포트가 데이터 길이를 수신하면 설정된 길이에 도달하면
CH9121은 시리얼 포트 데이터를 즉시 패킹하여 네트워크를 통해 전송합니다. 타임 아웃 시간 설정 범위는 0 ~ 200이고 타임 아웃 단위는
예를 들어 타임 아웃이 1 일 때, 시리얼 포트 수신 버퍼의 데이터 길이가 RX 패킷의 길이에 미치지 못하고 시리얼 포트가 끝났을 때 약 5ms입니다.
5ms 이내에 새 데이터가 수신되지 않으면 직렬 포트 시간 초과가 발생합니다. 직렬 포트 시간 초과가 발생한 후 CH9121은 직렬 포트를 수신합니다.
데이터는 네트워크를 통해 전송됩니다. 타임 아웃 시간이 0으로 설정되면 내부 하드웨어 타임 아웃이 활성화됩니다 (4 개 이상의 데이터 시간 동안 새 데이터가 수신되지 않음).
메커니즘에 따르면 실시간 요구 사항이 높고 대용량 데이터 송수신이 필요한 경우에 적합합니다. 직렬 포트 버퍼 지우기 설정은 네트워크 연결을 의미합니다.
연결이 설정되기 전에 직렬 포트에서 수신 한 데이터를 처리하는 방법 TCP 연결이 해제 (삭제)되거나 유지 될 때.

 

default allocation

 

When CH9121 leaves the factory, port 2 is closed by default, port 1 works in TCP CLI ENT mode by default, and the network-related default parameters are sequentially
for:
(1) Equipment I P: 192. 168. 1. 200
(2) Subnet mask: 255. 255. 255. 0
(3) Default gateway: 192. 168. 1.1
(4) Module port: 2000
(5) Purpose I P: 192. 168. 1. 100
(6) Destination port: 1000
(7) Number of reconnections: unlimited
The serial port related default parameters are as follows:
(1) Baud rate: 9600
(2) Timeout: 0
(3) Data bit: 8; stop bit: 1; check: none
(4) Clear the serial port buffer: never clear

 

Note: Due to space limitations, the power supply and the decoupling capacitors near the 3.3V and 1.8V pins are omitted in the figure for circuit design
Be sure to add it to the circuit, the detailed circuit reference file: CH9121PCB (please go to our official website to download).
U1 is the main control chip CH9121, TXD1 and RXD1 are compatible with 3. 3V and 5V levels. If the RS485 control pin DI R is not used, it can be directly left floating.
P1 is an RJ45 port with a built-in network transformer for connecting network devices such as switches and routers. Contains two pairs of Ethernet differential
signal.
When actually making a printed circuit board (PCB), R5- R8, C6, C7 should be as close as possible to the 5th pin of P1, and 3.3V and 1.8V are omitted in the figure.
The 0.1 uF decoupling capacitor of the pin, TXOP (RXI P) and TXON (RXI N) are differential signals, and the wiring should be close to parallel lines, as far as possible
Provide ground wire or copper on both sides to reduce external interference. Try to shorten the length of the crystal XI and XO related signals, in order to reduce the high
The interference of the frequency clock to the outside world can be caused by surrounding the bottom line or copper plating around the relevant components.

 

참고 : 공간 제한으로 인해 3.3V 및 1.8V 핀 근처의 전원 공급 장치 및 디커플링 커패시터는 회로 설계를 위해 그림에서 생략되었습니다.
회로, 자세한 회로 참조 파일 : CH9121PCB에 추가하십시오 (다운로드하려면 공식 웹 사이트를 방문하십시오).
U1은 메인 제어 칩 CH9121, TXD1 및 RXD1은 3. 3V 및 5V 레벨과 호환되며 RS485 제어 핀 DI R을 사용하지 않으면 직접 플로팅 상태로 둘 수 있습니다.
P1은 스위치 및 라우터와 같은 네트워크 장치를 연결하기위한 네트워크 변압기가 내장 된 RJ45 포트입니다. 두 쌍의 이더넷 차동 포함
신호.
실제로 인쇄 회로 기판 (PCB)을 만들 때 R5-R8, C6, C7은 P1의 5 번 핀에 최대한 가까워 야하며 그림에서 3.3V와 1.8V는 생략되어 있습니다.
핀의 0.1uF 디커플링 커패시터, TXOP (RXI P) 및 TXON (RXI N)은 차동 신호이며 배선은 가능한 한 병렬 라인에 가까워 야합니다.
외부 간섭을 줄이기 위해 양쪽에 접지선 또는 구리를 제공합니다. 높은 값을 줄이기 위해 크리스탈 XI 및 XO 관련 신호의 길이를 줄이십시오.
외부 세계에 대한 주파수 클록의 간섭은 관련 부품 주변의 하단 라인이나 구리 도금으로 인해 발생할 수 있습니다.

 

Ethernet Parameters
Number of ports: 1
Interface standard: RJ45 interface
LAN Ethernet: 10 / 100Mbps
Data cache: 6K bytes
Protection: 2KV electromagnetic isolation
Network protocols: IP, ARP, TCP, UDP, ICMP, IGMP, DCHP and so on

Serial Port Parameters
Number of ports: 1
Interface standard: TTL serial port, 2.54MM pin, 3.3V or 5V level
Baud rate: 300 ~ 921600bps
Data bits: 5,6,7,8,9
Stop bit: 1,2 bit
Parity: no parity, odd parity, even parity
Flow Control: None
Cache: 2K bytes

Supporting Software
Parameter configuration: network configuration software, serial AT command
Module testing: test software (network, serial one)

Basic Parameters
Size 43mmx23mmx14.5mm (length x width x height)
Working voltage DC3.3V / 5V
Operating current 200mA @ 5V
Power consumption ≤ 1W
Operating temperature -40 ~ 85 ° C
Storage temperature -55 ~ 125 ° C

Pin Description
1. RESET: Factory reset pin, the module power-on detection, active low
2. DIR: RS485 receive, send switch control pin
3. TCPCS: TCP client mode, the port connection status indicator pin, the connection is successful output low
4. RUN: module running status indication pin, input 2Hz square wave
5. GND: Power Ground Pin
6. 3.3V: 3.3V DC power input pin, greater than 200mA, and 5V DC power supply alternatively
7. GND: Power Ground Pin
8. 5V: 5V DC power input pin, greater than 200mA, and 3.3V DC power supply can choose one of two
9. RSTI: reset pin, the internal pull-up, low-effective, can not be vacant
10. CFG: serial port configuration module enable pin, built-in pull-up, low-effective, do not have to be vacant
11. RXD: Serial data receive pin, serial port TTL level, compatible with 3.3V and 5V
12. TXD: serial data transmission pin, serial TTL level, compatible with 3.3V and 5V
13. GND: Power Ground Pin
14. 3.3V: 3.3V DC power input pin, greater than 200mA, and 5V DC power supply alternatively
15. GND: Power Ground Pin
16. 5V: 5V DC power input pin, greater than 200mA, with the optional 3.3V DC power supply can be

 

www.chinalctech.com/m/view.php?aid=468

 

CH9121 UART to Ethernet module Server MCU Networking module_chinalctech

 

www.chinalctech.com

www.eztcp.com/en/download/pds_files/an_atc_mode_en.pdf

www.electronicpro.co.za/products/ch9121-stm32-serial-port-rs232-to-ethernet-network-module-ttl-transmission-module-industrial-microcontroller

 

CH9121 STM32 Serial Port RS232 to Ethernet Network Module TTL Transmission Module Industrial Microcontroller

Overview: RS232 to Ethernet, 5~18V power supply, one-button setting parameters, AT means to modify the module parameters in real time, automatically obtain IP, one button to restore factory settings. The module is a universal serial-to-Ethernet transparen

www.electronicpro.co.za

h-2technik.com/online/webee/ETH-01/H2_ETH-01.pdf

 

'임베디드 보드' 카테고리의 다른 글

rs485 + 온도센서 7개 수집보드  (0) 2022.02.26
#1-5 SR-201 릴레이 React-native 네트워크 제어  (0) 2022.02.03
CH9121 UDP 연결 포트 유지  (0) 2020.11.14
RPLIDAR SDK 분석  (0) 2020.08.31
RPLIDAR A2 설명  (0) 2020.08.29