|
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
ARP
If you look at the top of any of the
Sniffer screen shots, youýll notice that the second event is an ARP
broadcast, and the third event is the ARP reply from physical address
00EDTP. Photo 8 looks similar to the ARP request screen shot with
the exception of an additional physical address supplied by the Ethernet
development board (000045445450) and an Opcode 2 in the ARP frame
defining the frame as an ARP reply. The ARP process is somewhat like
an algebra problem. You use the knowns (IP addresses) to solve for
the unknowns (physical addresses).
 |
Photo 8ýThis shot is a steak
dinner perfectly cooked. (enlarge) |
If you start at the DA and count the total
number of bytes in the ARP reply, youýll come up with 42. Thatýs 60
bytes total frame length minus 18 bytes of padding. In Listing
14, Port C is commanded to output
0x2A and 42 bytes of ARP response buffer area are requested from the
CS8900A-CQ. This is called a bid in the CS8900A-CQ datasheet. After
the CS8900A-CQ allocates the space and sets the RDY4TXNOW_BIT,
the bits of the ARP reply flow out of the PIC16F877 RAM in the order
of the subareas you see in Figure 1 and Photo 8, starting with the
DA. After all of the bytes are collected in the CS8900A-CQ transmit
buffer, the CS8900A-CQ generates a preamble that is immediately followed
by an SFD. And assuming no collision occurs, the ARP reply hits the
ether followed by a CS8900A-CQ-generated CRC.
PREVIOUS
NEXT
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. |