W5100 network interface electronic circuit design

The W5100 is a versatile, single-chip network interface chip with an integrated 10/100Mbps Ethernet controller for high-integration, high-stability, high-performance, and low-cost embedded systems. With the W5100, you can make an Internet connection without an operating system. The W5100 is compatible with IEEE802.3 10BASE-T and 802.3u 100BASE-TX. The W5100 integrates a fully hardware-proven, multi-year market-proven TCP/IP stack, Ethernet media transport layer (MAC), and physical layer (PHY). The full hardware TCP/IP stack supports TCP, UDP, IPv4, ICMP, ARP, IGMP and PPPoE, which have been validated in many areas for many years. The W5100 also integrates 16KB of memory for data transfer. The W5100 does not require Ethernet control and requires simple port programming.


Interface with MCU


The interface between the W5100 and the MCU adopts the parallel bus mode (if the SPI interface is to be used, the W5200 is recommended), so the interface design between the W5100 and the MCU is relatively simple. Take AT89C52 as an example, as shown in the figure below.


Network Interface


A 32K SRAM (IS62C256) is externally expanded. According to the hardware interface shown, the address line A15 is used as the chip select signal of the SRAM. Therefore, the 32K XDATA address space is in 0&TImes; 0000~0x7FFF. The W5100 is also mapped to the XDATA space of the 89C52 as an external interface. The address line A15 is inverted (74AHC1G04) and used as the chip select signal of the W5100. Therefore, the address space of the W5100 is in 0&TImes; 8000~0xFFFF. If an indirect bus is used, address lines A2~A14 must be tied to ground to ensure that the indirect bus initialization is successful.


Reset signal


The most important reset signals in the W5100 hardware design are often overlooked. Many engineers use RC reset, although the effect of reset can be achieved, but it is not ideal in actual use. The poor reset of the W5100 often causes the device to fail to work properly. In particular, the physical layer of the Ethernet cannot be started normally, and the MCU may fail to initialize the W5100. The most ideal reset method is to use the MCU's IO port to output a reset signal. This can absolutely guarantee the synchronization between the W5100 and the MCU, and once the work fails, it is also convenient for the MCU to control the W5100. If the MCU can not provide enough IO port output reset signal, you can also use a dedicated reset chip (such as IMP809T), which can ensure a reliable reset, but when designing the MCU software, pay attention to the MCU's operation synchronization problem with the W5100.


How to connect a network transformer or RJ45


Network Interface


The HS-MAG1201 is an RJ-45 with a network transformer. For example, TCT and RCT are the center taps of the transmitter's transmitter and receiver. The center tap must be pulled 3.3V. Many engineers ignored this detail in their design. In addition, the metal casing of RJ-45 is best not to be connected to the power supply, if it is conditional, it is better to connect to the ground. TXOP/TXON, RXIP/RXIN PCB layout should be as long as possible, and try to parallel the trace. The RSET_BG resistor is connected to the RSET_BG resistor of the first leg of the W5100. It is best to use 1% precision resistor. Especially in mass production, using ordinary precision resistor (5%) will bring unexpected trouble to your product debugging. .


inductance


The inductance between the digital power supply and the analog power supply is very important. Because the current passing through the inductor is relatively large, if the inductor quality is not good, a large DC voltage drop and AC noise will be generated, which seriously affects the operation of the W5100. Many engineers have encountered this problem during initial commissioning. If there is no suitable inductor, the inductor can be removed and shorted directly with the wire.


Crystal oscillation


Crystal oscillations have the most problems and are the most difficult to solve.


The crystal oscillator of W5100 (W5300 and W7100 is the same as W5100) has problems. The main problems are as follows:


1. The oscillation frequency deviation is large, far from 25MHz;


2. The amplitude of the oscillation is not enough. The maximum amplitude of XTLN and XTLP is only a few hundred millivolts.


Recommended case