MICROCHIPENC28J60Data SheetStand-Alone Ethernet Controllerwith SPI InterfacePreliminaryDS39662C@2008 Microchip Technology Inc
© 2008 Microchip Technology Inc. Preliminary DS39662C ENC28J60 Data Sheet Stand-Alone Ethernet Controller with SPI Interface
NotethefollowingdetailsofthecodeprotectionfeatureonMicrochipdevices:Microchip products meet the specification contained in their particular Microchip Data Sheet.Microchip believes that itsfamily of products is oneofthemostsecurefamilies of its kind on themarkettoday,when used intheintendedmannerandundernormalconditionsThere are dishonest and possibly llegal methods used to breach the code protection feature. All of these methods, to ourknowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip's DataSheets. Most likely, the person doing so is engaged in theft of intellectual property.Microchip is willing to workwith thecustomerwho is concernedabout the integrity of theircode.Neither Microchip nor anyother semiconductormanufacturer can guarantee the security of their code.Code protection does notmean that we are guaranteeing the product as"unbreakable."Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of ourproducts. Attempts to break Microchip's code protection feature may be a violation of the Digital Millennium Copyright Act. If such actsallow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.Information contained in this publication regarding deviceTrademarksapplications and the like is provided only for your convenienceThe Microchip name and logo, the Microchip logo, Accuron,and may be superseded by updates. It is your responsibility todsPIC,KEELoQ,KEELoQlogo,MPLAB,PIC,PICmicroensure that your application meets with your specifications.PICSTART,PRO MATE, rfPIC and SmartShunt are registeredMICROCHIPMAKESNOREPRESENTATIONSORtrademarks of Microchip Technology Incorporated in theWARRANTIES OF ANY KIND WHETHER EXPRESSORU.S.A. and other countries.IMPLIED,WRITTENORORALSTATUTORYORFilterLab, Linear Active Thermistor, MXDEV, MXLAB,OTHERWISE,RELATEDTOTHEINFORMATION,SEEVAL,SmartSensorandTheEmbeddedControlSolutionsINCLUDING BUTNOTLIMITEDTOITSCONDITION,Company are registered trademarks of Microchip TechnologyQUALITY,PERFORMANCE,MERCHANTABILITYORIncorporated in the U.S.A.FITNESS FOR PURPOSE.Microchip disclaims all liabilityarising from this information and its use. Use of MicrochipAnalog-for-the-Digital Age, Application Maestro, CodeGuard,devices inlifesupportand/orsafetyapplications isentirelyatdsPICDEM, dsPICDEM.net,dsPICworks, dsSPEAK,ECAN,thebuyer's risk,andthebuyeragreesto defend,indemnifyandECONOMONITOR,FanSense, In-Circuit SerialholdharmlessMicrochipfromanyandalldamages,claims,Programming,ICSP,ICEPIC,Mindi,MiWi,MPASM,MPLABsuits,orexpensesresultingfromsuchuse.NolicensesareCertified logo, MPLIB, MPLINK, mTouch, PICkit, PICDEM,conveyed, implicitly or otherwise,under any MicrochipPICDEM.net, PICtail, PIC32 logo,PowerCal, Powerlnfointellectual property rights.PowerMate,PowerTool, REALICE,rfLAB,Select Mode,TotalEndurance, UNI/O,WiperLock and ZENA are trademarks ofMicrochip Technology Incorporated in the U.S.A. and othercountries.SQTPis a service mark of MicrochipTechnology Incorporatedin the U.S.AAll other trademarks mentioned herein are property of theirrespectivecompanies. 2008, Microchip Technology Incorporated, Printed in theU.S.A.,AllRightsReserved.6 Printed on recycled paper.Microchip received ISO/TS-16949:2002 certification for its worldwideheadquarters,design andwaferfabrication facinties in ChandlerandQUALITYMANAGEMENTSYSTEMTempe,Arizona,Gresham,Oregon anddesign centers in Califomiaand India.The Company'squality system processes andproceduresCERTIFIEDBYDNVareforitsPICMCUsanddsPICDSCs,KEELoqcodehoppingdevices, Serial EEPROMs,microperipherals, nonvolatilememory andanalogproducts.In addition,Microchip's quality systemforthe desigrIS0/TS16949:2002andmanufactureofdevelopmentsystemsis/S09001:2000certifiedPreliminaryDS39662C-page ii@ 2008 Microchip Technology Inc
DS39662C-page ii Preliminary © 2008 Microchip Technology Inc. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyerís risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, rfPIC and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, PICkit, PICDEM, PICDEM.net, PICtail, PIC32 logo, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, Select Mode, Total Endurance, UNI/O, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. © 2008, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. Note the following details of the code protection feature on Microchip devices: ï Microchip products meet the specification contained in their particular Microchip Data Sheet. ï Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. ï There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchipís Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. ï Microchip is willing to work with the customer who is concerned about the integrity of their code. ï Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as ìunbreakable.î Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchipís code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Companyís quality system processes and procedures are for its PICÆ MCUs and dsPICÆ DSCs, KEELOQÆ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchipís quality system for the design and manufacture of development systems is ISO 9001:2000 certified
ENC28J60MICROCHIPStand-Alone Ethernet Controller with SPIInterfaceEthernetControllerFeaturesOperational.IEEE802.3TMCompatibleEthernetController.SixInterruptSources and OneInterruptOutputPin:FullyCompatiblewith10/100/1000Base-TNetworks.25MHzClockInputRequirement:IntegratedMAC and10Base-TPHY·ClockOutPinwithProgrammablePrescaler.SupportsOne10Base-TPortwithAutomatic.OperatingVoltageof3.1Vto3.6V(3.3Vtypical)Polarity Detection and Correction.5VTolerantInputs.Supports Full and Half-Duplexmodes.TemperatureRange:-40°C to+85°C Industrial,:ProgrammableAutomaticRetransmitonCollision0°Cto+70CCommercial (SSOPonly)·ProgrammablePaddingand CRCGeneration·28-PinSPDIP,SSOP,SOIC,QFNPackagProgrammableAutomaticRejectionofErroneous.PacketsPackageTypes·SPI InterfacewithClock Speeds Upto20MHz28-PinSPDIP,SSOP,SOIC-128VDDBufferVCAP277口+LEDAVss口226-93.8-KbyteTransmit/ReceivePacketDualPortSRAMCLKOUTLEDB25 巨94INTVDDOSC·ConfigurableTransmit/ReceiveBufferSize2445ENC28J60+OSC2NC*·Hardware Managed CircularReceive FIFOso.D6OSC1SI227VSSOSC.Byte-WideRandomandSequentialAccesswith21ESCK-98VSSPLLAuto-IncrementCS20巨-9VDDPLL:InternalDMAforFastDataMovementRESET1019VDDRX18VSSRX~11VSSTX.HardwareAssistedChecksumCalculationfor招TPIN-+12TPOUT+VariousNetworkProtocolsTPIN++13TPOUT-14156RBIASVDDTXMediumAccessController(MAC)Features中电购28-pinQFN.SupportsUnicast, MulticastandBroadcastA3Packets:Programmable Receive Packet Filtering and Wake-upHoston Logical AND or ORof the Following:H-Unicastdestinationaddress28 27 26 25 24 23 22-MulticastaddressVDDOSC21日NC*120OSC22BroadcastaddressSO-年319巨OSC1SI--MagicPacketmENC28J604418VssOSCSCK-Groupdestinationaddresses as definedby75VSSPLLcs-年6VDDPLLRESET-64-bitHashTable15年7VDDRXVSSRXProgrammable Pattern Matching ofup to.89101112131464bytesatuser-defined offsetPhysicalLayer(PHY)Features:LoopbackmodeRB0.Two Programmable LED Outputs for LINK, TX,RX,CollisionandFull/Half-DuplexStatus*Reserved pin; always leave disconnected.PreliminaryDS39662C-page12008MicrochipTechnologyInc
© 2008 Microchip Technology Inc. Preliminary DS39662C-page 1 ENC28J60 Ethernet Controller Features ï IEEE 802.3ô Compatible Ethernet Controller ï Fully Compatible with 10/100/1000Base-T Networks ï Integrated MAC and 10Base-T PHY ï Supports One 10Base-T Port with Automatic Polarity Detection and Correction ï Supports Full and Half-Duplex modes ï Programmable Automatic Retransmit on Collision ï Programmable Padding and CRC Generation ï Programmable Automatic Rejection of Erroneous Packets ï SPI Interface with Clock Speeds Up to 20 MHz Buffer ï 8-Kbyte Transmit/Receive Packet Dual Port SRAM ï Configurable Transmit/Receive Buffer Size ï Hardware Managed Circular Receive FIFO ï Byte-Wide Random and Sequential Access with Auto-Increment ï Internal DMA for Fast Data Movement ï Hardware Assisted Checksum Calculation for Various Network Protocols Medium Access Controller (MAC) Features ï Supports Unicast, Multicast and Broadcast Packets ï Programmable Receive Packet Filtering and Wake-up Host on Logical AND or OR of the Following: - Unicast destination address - Multicast address - Broadcast address - Magic Packetô - Group destination addresses as defined by 64-bit Hash Table - Programmable Pattern Matching of up to 64 bytes at user-defined offset Physical Layer (PHY) Features ï Loopback mode ï Two Programmable LED Outputs for LINK, TX, RX, Collision and Full/Half-Duplex Status Operational ï Six Interrupt Sources and One Interrupt Output Pin ï 25 MHz Clock Input Requirement ï Clock Out Pin with Programmable Prescaler ï Operating Voltage of 3.1V to 3.6V (3.3V typical) ï 5V Tolerant Inputs ï Temperature Range: -40°C to +85°C Industrial, 0°C to +70°C Commercial (SSOP only) ï 28-Pin SPDIP, SSOP, SOIC, QFN Packages Package Types ENC28J60 28-Pin SPDIP, SSOP, SOIC 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 OSC2 OSC1 LEDA LEDB TPINTPIN+ INT NC* 1 2 3 4 5 6 7 8 9 10 28 27 26 25 24 23 22 21 20 19 ENC28J60 11 12 13 14 18 17 16 15 VDDOSC VDDTX TPOUT+ TPOUT- 28-pin QFN RESET CS SO SI SCK RBIAS VSSRX CLKOUT VCAP VDDRX VSSOSC VDDPLL VSSPLL VSSTX VDD VSS VCAP OSC2 OSC1 VDDRX VSSTX TPOUT+ TPOUTLEDA LEDB VDDOSC VSSOSC VDDTX VDDPLL VSSPLL CLKOUT RESET CS SO SI TPIN+ TPINRBIAS INT NC* SCK VDD VSS VSSRX * Reserved pin; always leave disconnected. Stand-Alone Ethernet Controller with SPI Interface
ENC28J60TableofContents1.0Overview...32.0External Connections53.011MemoryOrganization..4.0Serial Peripheral Interface (SPI)255.031EthernetOverview.6.033Initialization.....7.0TransmittingandReceivingPackets398.047Receive Filters...9.053DuplexModeConfigurationandNegotiation.5510.0FlowControl11.0Reset.596312.0 Interrupts.13.0 DirectMemoryAccessController7114.0Power-Down...737515.0Built-inSelf-TestController16.0 ElectricalCharacteristics7917.0 PackagingInformation.8389Appendix A: Revision History.TheMicrochip Web Site.9191CustomerChangeNotificationServiceCustomerSupport9192ReaderResponse93IndexProduct Identification System..95TOOURVALUEDCUSTOMERSIt is our intention toprovide ourvalued customers withthebestdocumentation possibleto ensuresuccessful useofyour Microchipproducts.Tothis end,wewill continueto improveourpublications to better suit your needs.Our publications willberefined andenhancedasnewvolumesandupdatesareintroduced.If youhaveanyquestionsorcomments regardingthispublication,pleasecontacttheMarketingCommunicationsDepartmentviaE-mail atdocerrors@microchip.com orfax the Reader ResponseForm in theback of this data sheetto(480)792-4150.Wewelcomeyourfeedback.Most CurrentDataSheetTo obtain the most up-to-date version of this data sheet, please registerat our Worldwide Web site at:http:/www.microchip.comYoucandetermine theversionofa data sheetbyexamining its literaturenumberfound on thebottom outsidecornerof anypage.The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000).ErrataAnerratasheet,describingminoroperationaldifferencesfromthedatasheetandrecommendedworkarounds,mayexistforcurrentdevices.Asdevice/documentationissuesbecomeknowntous,wewillpublishanerratasheet.TheerratawillspecifytherevisionofsiliconandrevisionofdocumenttowhichitappliesTodetermineif an errata sheet exists fora particulardevice,pleasecheck withoneof thefollowing:.Microchip'sWorldwideWebsite:http://www.microchip.comYourlocalMicrochipsalesoffice(seelastpage)Whencontactingasalesofficepleasespecifywhichdevice,revisionofsiliconanddata sheet (includeliteraturenumber)youareusingCustomerNotificationSystemRegisteron ourweb siteat www.microchip.comto receive themost current information on allof our products.PreliminaryDS39662C-page2?2008 Microchip Technology Inc
ENC28J60 DS39662C-page 2 Preliminary © 2008 Microchip Technology Inc. Table of Contents 1.0 Overview . 3 2.0 External Connections . 5 3.0 Memory Organization . 11 4.0 Serial Peripheral Interface (SPI). 25 5.0 Ethernet Overview. 31 6.0 Initialization. 33 7.0 Transmitting and Receiving Packets . 39 8.0 Receive Filters. 47 9.0 Duplex Mode Configuration and Negotiation. 53 10.0 Flow Control . 55 11.0 Reset . 59 12.0 Interrupts . 63 13.0 Direct Memory Access Controller. 71 14.0 Power-Down. 73 15.0 Built-in Self-Test Controller . 75 16.0 Electrical Characteristics . 79 17.0 Packaging Information. 83 Appendix A: Revision History. 89 The Microchip Web Site . 91 Customer Change Notification Service . 91 Customer Support. 91 Reader Response . 92 Index . 93 Product Identification System. 95 TO OUR VALUED CUSTOMERS It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at docerrors@microchip.com or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. We welcome your feedback. Most Current Data Sheet To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000). Errata An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies. To determine if an errata sheet exists for a particular device, please check with one of the following: ï Microchipís Worldwide Web site; http://www.microchip.com ï Your local Microchip sales office (see last page) When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are using. Customer Notification System Register on our web site at www.microchip.com to receive the most current information on all of our products
ENC28J601.0OVERVIEWThe ENC28J60 consists of seven major functionalblocks:The ENC28J60 is a stand-alone Ethernet controller1.AnSPlinterfacethatservesasacommunica-withan industry standard SerialPeripheral Interfacetionchannelbetween thehostcontrollerand the(SPl). It is designed to serve as an Ethernet networkENC28J60.interface for any controller equipped with SPl.2.Control registers which are used to controlandTheENC28J60meetsalloftheIEEE802.3specifica-monitortheENC28J60.tions.It incorporates a number of packet filtering3.A dual port RAM buffer for received andschemestolimitincomingpackets.Italsoprovidesantransmitteddatapacketsintemal DMAmoduleforfastdata throughput andhard-bAnarbiterto control theaccessto theRAMware assisted checksum calculation, which is used inbuffer whenrequests are madefrom DMA,variousnetworkprotocols.Communicationwiththetransmitandreceiveblocks.hostcontrollerisimplementedviaaninterruptpinand6The bus interface that interpretsdataandtheSPl,withclockratesofupto20MHz.Twocommandsreceived via the SPIinterface.dedicated pins are used for LED link and networkactivityindication6.The MAC (MediumAccess Control) module thatimplementsIEEE802.3compliantMAClogic.AsimpleblockdiagramoftheENC28J60isshownin7.The PHY (Physical Layer) module that encodesFigure 1-1.Atypical application circuit using the deviceand decodes the analogdata that is present onisshowninFigure1-2.WiththeENC28J60,twopulsethe twisted-pair interfacetransformersandafewpassivecomponents areall thatarerequiredtoconnectamicrocontrollertoanEthernetThedevicealsocontainsothersupportblocks,suchasnetwork.theoscillator,on-chipvoltageregulator,leveltranslatorstoprovide5Vtolerant/Osandsystemcontrol logicFIGURE1-1:ENC28J60BLOCKDIAGRAM繁BufferRX8KbytesMACDual PortRAMERXBMRXF (Filter)TXMIIchoInterfaceCLKOUTDMA&ControlArbiterChecksumμchoRegistersPHYTPIN+ch1TXchRX窗TXBMINTFlowControlBus InterfaceMIMRBIASInterface区HostInterface脑呕呕脑25MHzSPIVoltagePower-onOSC2System ControlOscillatorRegulatorReset区+卤卤VCAPRESET(1)Note 1:Thesepins are5Vtolerant.Preliminary@2008 Microchip Technology Inc.DS39662C-page 3
© 2008 Microchip Technology Inc. Preliminary DS39662C-page 3 ENC28J60 1.0 OVERVIEW The ENC28J60 is a stand-alone Ethernet controller with an industry standard Serial Peripheral Interface (SPI). It is designed to serve as an Ethernet network interface for any controller equipped with SPI. The ENC28J60 meets all of the IEEE 802.3 specifications. It incorporates a number of packet filtering schemes to limit incoming packets. It also provides an internal DMA module for fast data throughput and hardware assisted checksum calculation, which is used in various network protocols. Communication with the host controller is implemented via an interrupt pin and the SPI, with clock rates of up to 20 MHz. Two dedicated pins are used for LED link and network activity indication. A simple block diagram of the ENC28J60 is shown in Figure 1-1. A typical application circuit using the device is shown in Figure 1-2. With the ENC28J60, two pulse transformers and a few passive components are all that are required to connect a microcontroller to an Ethernet network. The ENC28J60 consists of seven major functional blocks: 1. An SPI interface that serves as a communication channel between the host controller and the ENC28J60. 2. Control registers which are used to control and monitor the ENC28J60. 3. A dual port RAM buffer for received and transmitted data packets. 4. An arbiter to control the access to the RAM buffer when requests are made from DMA, transmit and receive blocks. 5. The bus interface that interprets data and commands received via the SPI interface. 6. The MAC (Medium Access Control) module that implements IEEE 802.3 compliant MAC logic. 7. The PHY (Physical Layer) module that encodes and decodes the analog data that is present on the twisted-pair interface. The device also contains other support blocks, such as the oscillator, on-chip voltage regulator, level translators to provide 5V tolerant I/Os and system control logic. FIGURE 1-1: ENC28J60 BLOCK DIAGRAM Dual Port RAM 8 Kbytes DMA & Checksum TXBM RXBM Arbiter Flow Control Host Interface Control Registers 25 MHz Power-on PHY Bus Interface SPI MII Interface MIIM Interface TPOUT+ TPOUTTPIN+ TPINTX RX RBIAS OSC1 Voltage OSC2 System Control CS(1) SI(1) SO SCK(1) INT VCAP CLKOUT LEDA LEDB RESET(1) RXF (Filter) RX TX MAC ch0 ch1 ch0 ch1 Buffer Note 1: These pins are 5V tolerant. Reset Regulator Oscillator