PIC18F2480 MICROCHIP [Microchip Technology], PIC18F2480 Datasheet - Page 295

no-image

PIC18F2480

Manufacturer Part Number
PIC18F2480
Description
28/40/44-Pin Enhanced Flash Microcontrollers with ECAN Technology, 10-Bit A/D and nanoWatt Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F2480-E/ML
Manufacturer:
MICROCHIP
Quantity:
1 001
Part Number:
PIC18F2480-E/SO
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC18F2480-I/SO
Manufacturer:
Microchi
Quantity:
9 999
Part Number:
PIC18F2480-I/SO
Manufacturer:
MIC
Quantity:
20 000
Part Number:
PIC18F2480-I/SO
0
Part Number:
PIC18F2480-I/SP
Manufacturer:
TDK
Quantity:
64
Part Number:
PIC18F2480-I/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
REGISTER 23-21: RXERRCNT: RECEIVE ERROR COUNT REGISTER
EXAMPLE 23-5:
 2004 Microchip Technology Inc.
; Need to read a pending message from RXB0 buffer.
; To receive any message, filter, mask and RXM1:RXM0 bits in RXB0CON registers must be
; programmed correctly.
;
; Make sure that there is a message pending in RXB0.
BTFSS
BRA
; We have verified that a message is pending in RXB0 buffer.
; If this buffer can receive both Standard or Extended Identifier messages,
; identify type of message received.
BTFSS
BRA
; Read all 29-bits of Extended Identifier message.
...
; Now read all data bytes
MOVFF
...
; Once entire message is read, mark the RXB0 that it is read and no longer FULL.
BCF
...
bit 7-0
RXB0CON, RXFUL
NoMessage
RXB0SIDL, EXID
StandardMessage
RXB0DO, MY_DATA_BYTE1
RXB0CON, RXFUL
READING A CAN MESSAGE
bit 7
REC7:REC0: Receive Error Counter bits
This register contains the receive error value as defined by the CAN specifications.
When RXERRCNT > 127, the module will go into an error-passive state. RXERRCNT does not
have the ability to put the module in “bus-off” state.
Legend:
R = Readable bit
-n = Value at POR
REC7
R-0
REC6
R-0
PIC18F2480/2580/4480/4580
W = Writable bit
‘1’ = Bit is set
REC5
R-0
Preliminary
; Does RXB0 contain a message?
; No.
; Is this Extended Identifier?
; No.
; Yes.
; This will allow CAN Module to load new messages
; into this buffer.
Handle this situation...
This is Standard Identifier message.
This is Extended Identifier message.
REC4
R-0
REC3
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
R-0
REC2
R-0
x = Bit is unknown
REC1
R-0
DS39637A-page 293
REC0
R-0
bit 0

Related parts for PIC18F2480