- Ethernet MCUs and MPUs
- Ethernet of Everything
- Ethernet Devices
The PIC18F97J60 takes an input of 25 MHz and produces two frequencies
- 25 MHz for the Ethernet module, and
- 41.667 MHz for the Microcontroller block using the internal PLL block
Please refer to the section Oscillator Configuration in the datasheet of the PIC18F97J60 for further details.
This number represents the second half of a MAC address in decimal form. Converting “25867” to hex yields 00-65-0B. The first half of the MAC address for the board is 00-04-A3, which is Microchip’s OUI. Both together form a unique MAC address 00-04-A3-00-65-0B which can be used to configure the setting in TCPIPConfig.h file.
There are two kinds of Ethernet cable—straight-through (patch) and crossover. When connecting an embedded device directly to another embedded device (or a PC to a PC), a crossover cable must be used, while a straight-through cable must be used when connecting an embedded device or a PC to a hub/switch/router. Some new PCs, switches, and routers may have a feature called auto- medium dependent interface crossover (MDIX), which automatically detects the cable type and corrects the differential pair's connection inside the equipment.
- The internal analog circuitry in the PHY module requires that an external resistor be attached from RBIAS to ground. The value required is dependent on the device, check data sheet and errata documents for the required value. The resistor influences the TPOUT+/- signal amplitude. It should be placed as close as possible to the chip with no adjacent signal traces to prevent noise-capacitive coupling into the pin. It is recommended that the resistor be a surface mount type.
- The transformers should have at least the isolation rating as specified in the datasheet to protect against static voltages and meet IEEE 802.3 isolation requirements.
- Verify that the proper external clock frequency and ppm rating is used for the Ethernet PHY. For ENC28J60, ENCx24J600, and PIC18F97J60 family, the crystal should be a 25 MHz, 50 ppm parallel cut crystal.
The MAC address is a 48-bit or 64-bit Identifier (EUI-48™ & EUI-64™ node address) that provides the physical address of network hardware devices. An Ethernet MAC address has 48 bits, and every device must have its own unique MAC address. The first 24 bits of a MAC address are the Organizationally Unique Identifier (OUI). A MAC address is formed by concatenating an OUI with another 24-bit number, the Extension Identifier (EI). A company can purchase an OUI number directly from IEEE at http://standards.ieee.org/regauth/oui/index.shtml. Another option is to request for an Individual Address Block (IAB), but you will only get 4,096 unique addresses to use, versus 224 (over 16 million) different addresses when using an OUI.
You can purchase Microchip’s new EUI-48™ enabled MAC address chips. We do all of the above, offering our customers a hassle free, easy access and low-cost solution. These plug-and-play MAC address devices come with 1.5 Kb serial EEPROM space and are available in SPI, I2C and UNI/O® busses. Also, they can be purchased as and when needed and there are no volume requirements. These devices are EUI-64™ compatible also.
Some devices, such as the PIC32, ENC424J600 and ENC624J600 10/100 Ethernet controllers, come with MAC addresses already pre-programmed.
Some of the common RJ45 connectors recommended are:
- Bel Stewart 08B0-X1T-36-F
- Pulse JP011821UNL
When troubleshooting an Internet application, it is critical to be able to monitor network transactions to find out what is going on. Wireshark (www.wireshark.org) is a network protocol capture/analyzer tool that is powerful and easy to use with filtering capability and it is free. If you need to test your product for IEEE 802.3 compliance, take a look at the Interoperability Laboratory at the University of New Hampshire (IOL-UNH). There's no official IEEE 802.3 test compliance program, but the IOL-UNH testing service has become the industry's de facto test house.
If the network administrator takes care to configure the 10 Base-T nodes as a sub-network behind a switch or router, the speeds are auto negotiated and therefore do not degrade the performance of the 100 Base-TX network.
Software - TCP/IP FAQs
The web pages that are stored in the External EEPROM and then retrieved from the EEPROM or the Program memory to display on the PC over Ethernet has a link to “Stack Footprint”. This “Stack Footprint” can be used to understand the footprint occupied by the Layers.
The same web page can be retrieved from the web pages folder in the TCPIP Demo App folder which is in the Microchip Solutions folder in your C drive.
As of April 2012, the TCP/IP Stack has implemented the following Application Layer Protocols:
- HTTP, SSL, FTP, TFTP, SMTP, Telnet, DHCP, DNS, SNMP (v2c, v3), NetBIOS, Boot loader, Ping, NBNS, SNTP and UART Bridging
Apart from this, the following Transport Layer Protocols are implemented
- TCP, UDP and ICMP
The following Internet and Network Access layer Protocols are implemented:
- ARP and IPv4/v6
The TCP/IP Stack can be compiled using the following compilers:
- C18 Compiler if a 8-bit PIC® MCU device is selected.
- C30 Compiler if a 16-bit PIC MCU or dsPIC® DSC device is selected.
- XC32 Compiler if a 32-bit PIC MCU device is selected
For more information please visit www.microchip.com/XC
Communication over the Internet is accomplished by implementing the TCP/IP protocol. Microchip offers a free TCP/IP software stack optimized for all Microchip 8-/16-/32-bit MCU families. The stack is a suite of programs that provide services to all TCP/IP-based applications. Users do not need to know all the intricacies of the TCP/IP specifications in order to use it. Based on the TCP/IP Reference Model, the stack is divided into multiple layers, where each layer accesses services from one or more layers directly below it. Per specifications, many of the TCP/IP layers are “live”, in the sense that they not only act when a service is requested, but also when events like time-out or new packet arrival occurs. The stack is modular in design and is written in the ‘C’ programming language.
DOWNLOAD the latest stack that has been released by Microchip.
Microchip provides a TCPIP stack for PIC18, PIC24, PIC32 and dsPIC® families that is both royalty-free and in source code format. We offer full source code and royalty free as long as the code runs on a PIC® MCU. The TCPIP stack can be downloaded directly from HERE where additional detail about the stack layers can also be found.
The stack has define statements with which you can select the appropriate protocol files for your applications. Depending on the selection here, the files related to different protocols are either selected or not.