Microcontrollers control and monitor a wide range of applications while maintaining a minimal footprint, often a single chip. The PIC18F97J60 family from Microchip performs these functions—and handles Ethernet networking, too.
The chip is based on the 8-bit, 10-MIPS PIC18F architecture with an 8- by 8-bit hardware multiply. The 10BaseT full-duplex Ethernet support includes both the media access controller (MAC) and physical interface (PHY) (see the figure). Often, the PHY is a separate chip with many "Ethernet"-based microcontrollers. Incorporating both into the same package can cut the system's footprint in half.
NO NEED FOR SPEED
Support for 10BaseT Ethernet is slower than Fast Ethernet or 1-Gbit Ethernet, but it makes sense in a world with autospeed detect hubs and switches—plus an 8-bit platform that will be used for control and monitoring applications. The bandwidth supplied by 10BaseT is far more than an 8-bit platform could possibly utilize.
With the design's dual-port memory, packets can be created and processed without moving them into main memory. This frees up the main 4-kbyte SRAM for application data. The application also can use the 8 kbytes of dual-port memory while reserving just enough to handle any necessary Ethernet message traffic.
This approach is significantly more efficient than an external Ethernet chip that would require using a serial peripheral interface (SPI) or a parallel interface. The Ethernet controller can handle address matching up to 64 bytes, so any individual device can ignore most of the Ethernet traffic on a network.
Ethernet support includes the ability to drive a pair of status LEDs. The Ethernet buffers are managed in a circular fashion, since the hardware reduces the software overhead. There's support for DMA transfers as well.
FREE TCP/IP STACK
An Ethernet interface isn't much good without software. That's why Microchip provides a free TCP/IP stack. C source code can be downloaded from the company's Web site. It works with Microchip's MPLAB C30 compiler, as well as the Hi-Tech PICC-18 compiler.
The TCP/IP stack supports ARP, ICMP, UDP, DNS, NetBIOS name service, DHCP, SNMP, HTTP, FTP, TFTP, and Ethernet Device Discovery. Its modular software can include individual services, such as an HTTP Web server or SNMP client service. The HTTP Web server uses a flash-based file system and supports dynamic page generation.
The PIC18F97J60 incorporates the typical peripheral complement for a PIC18 class device. The high-end version features two serial ports that handle a local interconnect network (LIN), a pair of SPI/I2C ports, five timers (two 8-bit, three 16-bit), and five enchanced capture/compare/ PWMs (ECCPs) that suit a variety of motor control apptions.
Analog support includes a pair of comparators and a 16-channel, 10-bit analog-to-digital converter (ADC). The ADC can operate at up to 100 ksamples/s, including auto acquisition operation. The multiplexed pins can take on up to 70 general-purpose I/O (GPIO) signals. High-current ports can handle 25 mA/pin. The chip supports an internal oscillator as a primary or backup clock source.
The PIC18F97J60 is priced at $4.24. It's available in thin-quad flatpack (TQFP) and fine-pitch, ball-grid-array (FBGA) packages with pin counts of 64, 80, and 100. The 100-pin version of the PIC18F97J60 features an external memory bus. Demo, evaluation, and PICtailPlus boards are available.