ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Implementation on the basis of the W5100 chip of a device for working in Ethernet networks. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Computers Currently, remote access to information, data collection, remote control and monitoring in industry, security systems, IP telephony and video communication services are widely developed in everyday life and business life. All this becomes an integral part of modern life. An obligatory component of such systems is communication channels, and wire lines remain the basis for building computer networks and telecommunications. The main technology used in local area networks is Ethernet. The most common protocol stack in Ethernet networks is TCP/IP. Their structure turned out to be successful for the transmission of heterogeneous information; it is optimal for high-speed local networks with multimedia traffic. It was these protocols that formed the basis of the Internet. They can be implemented in several ways. The first way is software. But there are many difficulties along the way. Creating a software protocol stack or even porting existing, freely distributed in source code stacks (such as IwlP, ulP) is a rather complex and time-consuming task. The stack requires an operating system, which can also take a long time to adapt to a specific microcontroller. In addition, almost all operating systems (with the exception of a few clones of Linux) are not distributed for free. The software implementation of the protocols intensively uses the resources of the operating system, processor and memory, which negatively affects the performance of the system as a whole. To save the microcontroller from performing data transfer procedures over a communication channel and significantly reduce the development time, the second method allows - the hardware implementation of part of the protocols using specialized LSI. This article will describe the practical implementation of a system designed to work in Ethernet networks using standard protocols, built on a microcontroller and a specialized LSI from WIZnet, which implements the TCP / IP protocol stack in hardware. The AT91SAM9261 microcontroller with an ARM9 processor core was used. His choice was influenced by the presence of a number of necessary peripheral functions. However, it is possible to use almost any other microcontroller, including a much less productive one, although this may have to be paid for by a decrease in the exchange rate. For hardware implementation of TCP / IP protocols, the W5100 chip is used, which has the following capabilities: - hardware implementation of protocols TCP, UDR ICMR IPv4 ARR IGMR PPPoE, Ethernet;
The existing AT91SAM9261-EK development board served as the basis for the system layout. A WIZ810MJ module was installed on the board, containing a W5100 chip with the necessary "piping" and an RJ113BZ assembly - an RJ-45 connector with built-in galvanic isolation transformers and matching elements. For connection with a control device (microcontroller), the module is equipped with two pin connectors PBD2-28. All documentation required to work with the W5100 chip and with the WIZ810MJ module is available on the official WIZnet website: wiznet.co.kr. There is also the driver's C source text, which implements high-level functions for working with W5100 sockets, as well as a guide for porting the driver. I want to note that all the documentation is written in a very understandable form, so it will not be difficult to figure out how to connect and program the W5100. Documentation for the AT91SAM9261 microcontroller can be found at at91.com The connection diagram of the WIZ810MJ module to the AT91SAM9261 microcontroller for operation in Direct mode is shown in the figure. Numbers of pins of the microcontroller are indicated in brackets. The DO-D7 lines form the data bus, the AO-A14 lines form the address bus. NRD signal - reading from memory, NWE signal - writing to memory. The RESET signal, which resets the W5100 chip, can be sent from any free line of the microcontroller port. The RVO line was used. The AT91SAM9261 microcontroller provides the ability to connect up to eight devices, data exchange with which is carried out as with external memory. For each of them, an area is allocated in the memory space of the microcontroller and its own device select signal (CS) is generated. In this case, the CS6 signal (alternative function of the PCO line) is involved. In order to quickly respond to a change in the state of the W5100 microcircuit, it is necessary to apply the INT signal to the microcontroller and configure the port line to which it is applied to generate interrupt requests on a falling level difference. The software interrupt handler must parse the contents of the Sn_IR register on the W5100 chip. In this case, the interrupt request input from the W5100 is the PC2 line. The following describes the steps required to configure the microcontroller and the W5100 chip to work on Ethernet. Program fragments are written in C and can be used practically without changes for any Atmel ARM microcontrollers.
First of all, we need to make some changes to the types.h file. String replacement #define _DEF_IINCHIP_MAP_BASE_ 0x8000
Next, you need to convert the 16-bit pointers to the receive and transmit buffers into 32-bit ones. To do this, in the lines static uintl6
Further in the text of the program, we replace all 16-bit addresses passed as function parameters with 32-bit ones. After these replacements are made, you can save the file and use the high-level functions of the driver in the main program. It remains only to initialize the SMC (Static Memory Controller) of the microcontroller to generate the CS6 signal (Table 1) and enter the desired values into the registers of the W5100 chip (Table 2). Now that all the necessary settings have been made, the system is ready to work on any of the protocols supported by the W5100 chip. For example, in table. 3 shows a possible procedure for receiving messages in the "server" mode, and in table. 4 - the transfer procedure in the "client" mode. The most significant drawback of the W5100 chip is the lack of a built-in ability to fragment packages. Therefore, when sending large amounts of information, their breakdown into packages will have to be dealt with by the microcontroller program. This also prevents the chip from being used as a router. Nevertheless, the W5100 chip, due to its low cost and the availability of driver source codes, can be recommended for connecting microcontroller systems to an Ethernet network using standard TCP / IP protocols. Author: K. Snegov, R. Shishko, Voronezh; Publication: radioradar.net See other articles Section Computers. Read and write useful comments on this article. Latest news of science and technology, new electronics: Artificial leather for touch emulation
15.04.2024 Petgugu Global cat litter
15.04.2024 The attractiveness of caring men
14.04.2024
Other interesting news: ▪ Artificial intelligence received copyright ▪ Tsunami pacified by mathematics News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ site section Indicators, sensors, detectors. Article selection ▪ article Miracle-yudo fish-whale. Popular expression ▪ article When was the first mummy made? Detailed answer ▪ article dugout boat. Tourist tips ▪ article Match in balance. Focus Secret
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |