ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

THE ETHERNET DEVELOPMENT BOARD


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

THE ETHERNET DEVELOPMENT BOARD

Lessons from the Trenches Part 2: The Software and Firmware Exposed
by Fred Eady

Start ý The Basics ý Registers ý Bus Interface Registers ý Status and Control Registers ý InitChip ý Initiate Transmit Registers ý Address Filter Registers ý Receive and Transmit Frame Locations ý CS8900A-CQ Transmit and Receive Operations ý The Next Read ý Broadcast ý ARP ý No Cheating ý Tiger Woodsý Putter ý Whatýs the Point? ý And It Programs, Too! ý Sources and PDF

THE BASICS

The first thing to do is establish an IP address for the Ethernet development board. Any valid IP address will work, and your choice of IP addresses depends on where the Ethernet development board will be used. I used 192.168.1.150, as it is one of the addresses reserved for private networks. The IP address of the Ethernet development board is specified in the IP address definition area of the code. Hexadecimal notation could have been used in the definition, but itýs not as easy to read and remember as dotted decimal notation. Thus, the "D" before each IP octet in Listing 1 tells the compiler that the numbers are in decimal format, rather than the compilerýs default hexadecimal format.

The next order of business is to assign a hardware or MAC (Media Access Control) address to the Ethernet development board. The hardware address is normally a purchased item that is regulated by the IEEE. If you plan to use the Ethernet development board in a commercial environment, youýll need to purchase a unique hardware identifier. The idea is to not have identical hardware addresses on any NIC.

The common commercial MAC address is most often a combined IEEE-supplied ID merged with the Ethernet deviceýs manufacturing serial number. You can normally find this Organizationally Unique Identifier (OUI) printed on commercial Ethernet NICs. Issuing ARPýa in a command window of WIN98 will also show you the OUI if the NIC has registered itself in the ARP cache.

As I progress and view some network dumps, youýll notice that the Ethernet NIC Iým using has a common set of digits that identify it as an SMC NIC. Iým not allowing my Ethernet development board to interface to the Internet, so a MAC of 00EDTP is assigned in the driver code Iým offering. If you plan to use the Ethernet development board commercially or interface it to the Internet, follow the rules for obtaining and using the OUI. For more details, check out the OUI article I wrote for my embedded column in Circuit Cellar magazine.

The MAC address is stored in the CS8900A-CQ in the Individual Address (IA) register. The layout of the IA register makes it necessary to place the most significant octet of the MAC address into the least significant octet of the IA register and so on. I defined three MYMACXX variables that put the MAC octets in the right order before they are loaded into the CS8900A-CQýs IA register. To keep you from having to dig out the CS8900A-CQ datasheet, the Ethernet development board MAC and the CS8900A-CQ IA register layout is given in Listing 2.

PREVIOUSNEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ýCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ