12.01.2015 Views

Download - Academy Publisher

Download - Academy Publisher

Download - Academy Publisher

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

support 10 Mb / s. But ENC28J60 only supports SPI<br />

mode 00, ie CPOL = 0 and CPHA = 0. In addition, SPI<br />

port requirements for the idle state SCK is low and does<br />

not support the clock polarity selection.<br />

2. TCP / IP protocol stack to streamline and achieved:<br />

taking into account the MCU RAM storage space<br />

constraints and specific application requirements,<br />

reasonable to simplify TCP / IP protocol stack, select the<br />

realization of ARP, IP, ICMP, TCP, and HTTP protocols.<br />

3.Physical layer implementation of the interface: the<br />

physical layer interface for the ENC28J60 the driver, the<br />

hardware is a circuit ENC28J60 the physical cable link,<br />

medium access control, frame transmit and receive<br />

functions, but shall be driven with the upper protocol<br />

interface procedures, to achieve to send and receive data<br />

frames.<br />

4. The network layer protocol implementation:<br />

network-layer protocols, including ARP, IP, ICMP<br />

protocols.<br />

Know both the network connection between the<br />

physical address, while the ARP protocol is address<br />

resolution protocol to achieve IP address to physical<br />

address conversion. Internet Protocol (IP) is responsible<br />

for the message sent from one host to another host. ICMP<br />

protocol is Internet Control Message Protocol for IP hosts,<br />

passing control messages between routers. Control of<br />

news is that the network is clear, host is up, routing is<br />

available and so the network itself the message.<br />

B. Ethernet Buffer<br />

Ethernet buffer contains the Ethernet controller for use<br />

to send and receive memory, the buffer size is 8KB, is<br />

divided into separate receive and send buffer space. Host<br />

controller using the SPI interface can send and receive<br />

capacity and location of storage of their programming.<br />

Receive buffer consists of a hardware management cycle<br />

FIFO buffer composition. Register for ERXSTH:<br />

ERXSTL and ERXNDH: ERXNDL as a pointer, the<br />

definition of buffer capacity and its memory location.<br />

When you accept the logic is disabled, the main<br />

controller can be programmed ERXST and ERXND<br />

pointers. When the receiver logic is used, not allowed to<br />

modify the pointer. 8KB memory has not been set up to<br />

receive FIFO buffer space, can be used as send buffer.<br />

Main controller is responsible for managing the data<br />

packets sent within the storage buffer. When the master<br />

controller decided to send a packet, ERXST and ERXND<br />

the pointer will be programmed to point to send data<br />

packets to be sent within a buffer address. Hardware does<br />

not check whether the start and end addresses overlap<br />

with the receive buffer. Main controller through separate<br />

read and write pointers (ERDPT and EWRPT) as well as<br />

read, write buffer SPI commands to access the contents of<br />

the Ethernet buffer.<br />

Receive buffer free space calculation method:<br />

If ERXWRPT>ERXRDPT, then<br />

Freespace=(ERXND-ERXST)-(ERXWRPT-ERXRDPT)<br />

If ERXWRPT=ERXRDPT, then<br />

Freespace=(ERXND-ERXST)<br />

Else<br />

Freespace=ERXRDPT-ERXWRPT-1<br />

When the order reads receive buffer when the receive<br />

buffer memory in the read data will be folded back to the<br />

bottom of the first part to continue reading. In calculating<br />

the checksum, the integrated DMA controller to read<br />

buffer; when the copy storage space, you must read and<br />

write buffer. DMA follow the rules of SPI access to the<br />

same turn back. The remote PC, transfer data packets<br />

over the Internet for twisted-pair physical medium to<br />

reach the local embedded systems, first of all through the<br />

isolation transformer coupled into the Ethernet control<br />

chip ENC28J60 in, ENC28J60 embedded in the physical<br />

layer and MAC layer to perform the address resolution<br />

protocol, and then to the LPC2132 microcontroller,<br />

LPC2132 implementation of the streamlining of TCP / IP<br />

protocol stack, remove the TCP / IP header, get useful<br />

data, and then embedded devices to achieve remote<br />

control and monitoring of the Internet.<br />

C. Duplex Mode Configuration<br />

ENC28J60 does not support duplex mode adaptive<br />

(auto-negotitation). If ENC28J60 enable duplex mode to<br />

connect to the Ethernet controller adaptive, then it will be<br />

detected as a half-duplex devices. This set is a full-duplex<br />

mode communications. When MACON3.FULDPX = 1<br />

and PHCON.1PDPXMD = 1 Shi, ENC28J60 work in<br />

full-duplex mode. If these two bits, only one bit is cleared,<br />

then the ENC28J60 the working state of uncertainty and<br />

can not work properly. Master in the mode switching<br />

device does not send any data packets to maintain<br />

ECON1.TXRTS cleared. In full-duplex mode, you can<br />

also receive and send data packets. In this case, when<br />

sending data packets will not occur any conflict. In fullduplex<br />

mode (MACON3.FULDPX = 1), the hardware<br />

flow control is controlled by sending pause frames to<br />

achieve. Pause control frame is 64 bytes long, from the<br />

reserved multicast destination address 01-80-C2-00-00-<br />

01, sending node, the source address, a special suspension<br />

of operation code, two bytes of the suspension timer<br />

value, and fill / CRC bits.<br />

D. In the river sediment measurement<br />

With the modernization of China's development of<br />

hydrology and water resources information collection,<br />

transmission, processing and prediction of intelligence<br />

have been gradually speed up the construction progress of<br />

the hydrological work flow measurement, measuring sand,<br />

measuring rainfall is heavy throughout the hydrological<br />

work in the weight, the accuracy of these monitoring data<br />

for China's flood control and drought and water<br />

management conservation significance. The use of the<br />

existing hydrological stations in river hydrology<br />

cableway will we have designed an underwater camera<br />

equipment sunk a pre-set vertical position, when the bank<br />

issued the workstation computer, camera control<br />

commands, the underwater camera to camera began to<br />

water samples, and the image transmitted to the image<br />

acquisition card, and then will be collected by the ARM<br />

image data transmission to the bank workstations.<br />

Riparian workstation computer for various pieces of<br />

image denoising, segmentation, calculation and<br />

processing, and thus arrive at the river sediment content.<br />

37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!