English
Language : 

PIC18F97J60_11 Datasheet, PDF (253/492 Pages) Microchip Technology – 64/80/100-Pin, High-Performance, 1-Mbit Flash Microcontrollers with Ethernet
PIC18F97J60 FAMILY
TABLE 19-5: RECEIVE STATUS VECTORS
Bit
Field
Description
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15-0
Zero
Receive VLAN Type Detected
Receive Unknown Opcode
Receive Pause Control Frame
Receive Control Frame
Dribble Nibble
Receive Broadcast Packet
Receive Multicast Packet
Received OK
Length Out of Range
Length Check Error
CRC Error
Reserved
Carrier Event Previously Seen
Reserved
Long Event/Drop Event
Received Byte Count
‘0’
Current frame was recognized as a VLAN tagged frame.
Current frame was recognized as a control frame, but it contained an
unknown opcode.
Current frame was recognized as a control frame containing a valid pause
frame opcode and a valid destination address.
Current frame was recognized as a control frame for having a valid
type/length designating it as a control frame.
Indicates that after the end of this packet, an additional 1 to 7 bits were
received. The extra bits were thrown away.
Indicates packet received had a valid Broadcast address.
Indicates packet received had a valid Multicast address.
Indicates that the packet had a valid CRC and no symbol errors.
Indicates that frame type/length field was larger than 1500 bytes
(type field).
Indicates that frame length field value in the packet does not match the
actual data byte length.
Indicates that the frame CRC field value does not match the CRC
calculated by the MAC.
Indicates that at some time since the last receive, a carrier event was
detected. The carrier event is not associated with this packet. A carrier
event is activity on the receive channel that does not result in a packet
receive attempt being made.
Indicates a packet over 50,000 bit times occurred or that a packet was
dropped since the last receive.
Indicates length of the received frame. This includes the destination
address, source address, type/length, data, padding and CRC fields. This
field is stored in little-endian format.
19.5.3.2 Reading Received Packets
To process the packet, an application will normally start
reading from the beginning of the Next Packet Pointer.
The application will save the Next Packet Pointer, any
necessary bytes from the receive status vector, and
then proceed to read the actual packet contents. If the
AUTOINC bit is set, it will be able to sequentially read
the entire packet without ever modifying the ERDPT
registers. The Read Pointer would automatically wrap
at the end of the circular receive buffer to the beginning.
In the event that the application needed to randomly
access the packet, it would be necessary to manually
calculate the proper ERDPT registers, taking care to
not exceed the end of the receive buffer if the packet
spans the ERXND to ERXST buffer boundary. In other
words, given the packet start address and a desired
offset, the application should follow the logic shown in
Equation 19-1.
EQUATION 19-1: RANDOM ACCESS ADDRESS CALCULATION
If Packet Start Address + Offset > ERXND, then
ERDPT = Packet Start Address + Offset – (ERXND – ERXST + 1)
else:
ERDPT = Packet Start Address + Offset
 2011 Microchip Technology Inc.
DS39762F-page 253