Datasheet
2011 Microchip Technology Inc. DS39762F-page 247
PIC18F97J60 FAMILY
19.5 Transmitting and Receiving Data
The Ethernet protocol (IEEE Standard 802.3) provides
an extremely detailed description of the 10 Mbps,
frame-based serial communications system. Before
discussing the actual use of the Ethernet module, a
brief review of the structure of a typical Ethernet data
frame may be appropriate. It is assumed that users
already have some familiarity with IEEE 802.3. Those
requiring more information should refer to the official
standard, or other Ethernet reference texts, for a more
comprehensive explanation.
19.5.1 PACKET FORMAT
Normal IEEE 802.3 compliant Ethernet frames are
between 64 and 1518 bytes long. They are made up of
five or six different fields: a destination MAC address, a
source MAC address, a type/length field, data payload,
an optional padding field and a Cyclic Redundancy
Check (CRC). Additionally, when transmitted on the
Ethernet medium, a 7-byte preamble field and
Start-of-Frame (SOF) delimiter byte are appended to
the beginning of the Ethernet packet. Thus, traffic seen
on the twisted-pair cabling will appear as shown in
Figure 19-8.
19.5.1.1 Preamble/Start-of-Frame Delimiter
When transmitting and receiving data with the Ethernet
module, the preamble and Start-of-Frame delimiter
bytes are automatically generated, or stripped from the
packets, when they are transmitted or received. It can
also automatically generate CRC fields and padding as
needed on transmission, and verify CRC data on
reception. The user application does not need to create
or process these fields, or manually verify CRC data.
However, the padding and CRC fields are written into
the receive buffer when packets arrive, so they may be
evaluated by the user application as needed.
FIGURE 19-8: ETHERNET PACKET FORMAT
SA
Padding
FCS
(1)
Number Field Comments
6
46-1500
4
DA
Destination Address,
such as Multicast, Broadcast or Unicast
Source Address
Packet Payload
Frame Check Sequence – CRC
Type/Length
Data
of Bytes
6
2
Type of Packet or the Length of the Packet
(with optional padding)
7
Preamble
Filtered Out by the Module
SFD
1
Start-of-Frame Delimiter
(filtered out by the module)
Used in the
Calculation
of the FCS
Note 1: The FCS is transmitted starting with bit 31 and ending with bit 0.