Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
2
Добавлен:
18.07.2023
Размер:
1.3 Mб
Скачать

ENC28J60

5.0ETHERNET OVERVIEW

Before discussing the use of the ENC28J60 as an Ethernet interface, it may be helpful to review the structure of a typical data frame. Users requiring more information should refer to the IEEE 802.3 standard which is the basis for the Ethernet protocol.

5.1Packet 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 5-1.

5.1.1PREAMBLE/START-OF-FRAME DELIMITER

When transmitting and receiving data with the ENC28J60, the preamble and Start-of-Frame delimiter bytes will automatically be generated or stripped from the packets when they are transmitted or received. The host controller does not need to concern itself with them. Normally, the host controller will also not need to concern itself with padding and the CRC which the ENC28J60 will also be able to automatically generate when transmitting and verify when receiving. The padding and CRC fields will, however, be written into the receive buffer when packets arrive, so they may be evaluated by the host controller if needed.

FIGURE 5-1:

ETHERNET PACKET FORMAT

 

 

 

 

 

 

Number

Field

 

Comments

 

 

 

 

of Bytes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7

 

 

 

 

 

Filtered Out by the Module

 

 

 

 

 

 

Preamble

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Start-of-Frame Delimiter

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

SFD

 

 

 

 

 

 

 

 

 

 

(filtered out by the module)

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

Destination Address,

 

 

 

 

 

 

DA

 

 

 

 

 

 

 

 

 

 

such as Multicast, Broadcast or Unicast

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

SA

 

 

Source Address

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Type of Packet or the Length of the Packet

 

Used in the

 

2

 

 

Type/Length

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Calculation

 

 

 

 

 

 

 

 

of the FCS

 

 

 

 

 

Data

 

 

Packet Payload

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

46-1500

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(with optional padding)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Padding

 

 

 

 

 

 

 

4

 

 

FCS(1)

 

 

Frame Check Sequence – CRC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note 1: The FCS is transmitted starting with bit 31 and ending with bit 0.

2006-2012 Microchip Technology Inc.

.

DS39662E-page 31