数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

ENC28J60-C/SP 数据表(PDF) 74 Page - Microchip Technology

部件名 ENC28J60-C/SP
功能描述  Stand-Alone Ethernet Controller with SPI Interface
PDF  96 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  MICROCHIP [Microchip Technology]
网页  http://www.microchip.com
标志 MICROCHIP - Microchip Technology

ENC28J60-C/SP 数据表(HTML) 74 Page - Microchip Technology

Back Button ENC28J60-C/SP Datasheet HTML 70Page - Microchip Technology ENC28J60-C/SP Datasheet HTML 71Page - Microchip Technology ENC28J60-C/SP Datasheet HTML 72Page - Microchip Technology ENC28J60-C/SP Datasheet HTML 73Page - Microchip Technology ENC28J60-C/SP Datasheet HTML 74Page - Microchip Technology ENC28J60-C/SP Datasheet HTML 75Page - Microchip Technology ENC28J60-C/SP Datasheet HTML 76Page - Microchip Technology ENC28J60-C/SP Datasheet HTML 77Page - Microchip Technology ENC28J60-C/SP Datasheet HTML 78Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 74 / 96 page
background image
ENC28J60
DS39662B-page 72
Preliminary
© 2006 Microchip Technology Inc.
13.2
Checksum Calculations
The checksum calculation logic treats the source data as
a series of 16-bit big-endian integers. If the source range
contains an odd number of bytes, a padding byte of 00h
is effectively added to the end of the series for purposes
of calculating the checksum. The calculated checksum
is the 16-bit one’s complement of the one’s complement
sum of all 16-bit integers. For example, if the bytes
included in the checksum were {89h, ABh, CDh}, the
checksum would begin by computing 89ABh + CD00h.
A carry out of the 16th bit would occur in the example, so
in 16-bit one’s complement arithmetic, it would be added
back to the first bit. The resulting value of 56ACh would
finally be complemented to achieve a checksum of
A953h.
To calculate a checksum:
1.
Program the EDMAST and EDMAND register
pairs to point to the first and last bytes of buffer
data to be included in the checksum. Care should
be taken when programming these Pointers to
prevent a never ending checksum calculation
due to receive buffer wrapping.
2.
To generate an optional interrupt when the
checksum calculation is done, clear EIR.DMAIF,
set EIE.DMAIE and set EIE.INTIE.
3.
Start the calculation by setting ECON1.CSUMEN
and ECON1.DMAST.
When the checksum is finished being calculated, the
hardware will clear the DMAST bit, set the DMAIF bit
and an interrupt will be generated if enabled. The DMA
Pointers will not be modified and no memory will be
written to. The EDMACSH and EDMACSL registers will
contain the calculated checksum. The host controller
may write this value into a packet, compare this value
with a received checksum, or use it for other purposes.
Various protocols, such as TCP and IP, have a checksum
field inside a range of data which the checksum covers.
If such a packet is received and the host controller needs
to validate the checksum, it can do the following:
1.
Read the checksum from the packet and save it
to a temporary location
2.
Write zeros to the checksum field.
3.
Calculate a new checksum using the DMA
controller.
4.
Compare the results with the saved checksum
from step 1.
Writing to the receive buffer is permitted when the write
address is protected by means of the ERXRDPT
Pointers. See Section 7.2 “Receiving Packets” for
additional information.
The IP checksum has unique mathematical properties
which may be used in some cases to reduce the
processing requirements further. Writing to the receive
buffer may be unnecessary in some applications.
When operating the DMA in Checksum mode, it will
take one main clock cycle for every byte included in the
checksum. As a result, if a checksum over 1446 bytes
were performed, the DMA module would require
slightly more than 57.84
μs to complete the operation.
TABLE 13-1:
SUMMARY OF REGISTERS ASSOCIATED WITH THE DMA CONTROLLER
Register
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset
Values
on page
EIE
INTIE
PKTIE
DMAIE
LINKIE
TXIE
r
TXERIE
RXERIE
13
EIR
PKTIF
DMAIF
LINKIF
TXIF
r
TXERIF
RXERIF
13
ECON1
TXRST
RXRST
DMAST
CSUMEN
TXRTS
RXEN
BSEL1
BSEL0
13
ERXNDL
RX End Low Byte (ERXND<7:0>)
13
ERXNDH
RX End High Byte (ERXND<12:8>)
13
EDMASTL
DMA Start Low Byte (EDMAST<7:0>)
13
EDMASTH
DMA Start High Byte (EDMAST<12:8>)
13
EDMANDL
DMA End Low Byte (EDMAND<7:0>)
13
EDMANDH
DMA End High Byte (EDMAND<12:8>)
13
EDMADSTL DMA Destination Low Byte (EDMADST<7:0>)
13
EDMADSTH
DMA Destination High Byte (EDMADST<12:8>)
13
EDMACSL
DMA Checksum Low Byte (EDMACS<7:0>)
13
EDMACSH
DMA Checksum High Byte (EDMACS<15:8>)
13
Legend: — = unimplemented, read as ‘0’. Shaded cells are not used with the DMA controller.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com