2000 Microchip Technology Inc.
Advanced Information
DS30475A-page 185
PIC18CXX8
17.2
Control Registers for the CAN Module
There are many registers associated with the CAN
module. Descriptions of these registers are grouped
into sections. These sections are:
Control and Status Registers
Transmit Buffer Registers
Receive Buffer Registers
Baud Rate Control Registers
Interrupt Status and Control Registers
17.2.1
CAN CONTROL AND STATUS REGISTERS
This section shows the CAN Control and Status
registers.
REGISTER 17-1:
CANCON – CAN CONTROL REGISTER
Note:
Not all CAN registers are available in the
access bank.
R/W-1
R/W-0
U-0
REQOP2
REQOP1
REQOP0
ABAT
WIN2
WIN1
WIN0
—
bit 7
bit 0
bit 7-5
REQOP2:REQOP0: Request CAN Operation Mode bits
1xx
= Request Configuration mode
011
= Request Listen Only mode
010
= Request Loopback mode
001
= Request Disable mode
000
= Request Normal mode
bit 4
ABAT: Abort All Pending Transmissions bit
1 = Abort all pending transmissions (in all transmit buffers)
0 = Transmissions proceeding as normal
bit 3-1
WIN2:WIN0: Window Address bits
This selects which of the CAN buffers to switch into the access bank area. This allows access
to the buffer registers from any data memory bank. After a frame has caused an interrupt, the
ICODE2:ICODE0 bits can be copied to the WIN2:WIN0 bits to select the correct buffer. See
111
= Receive Buffer 0
110
= Receive Buffer 0
101
= Receive Buffer 1
100
= Transmit Buffer 0
011
= Transmit Buffer 1
010
= Transmit Buffer 2
001
= Receive Buffer 0
000
= Receive Buffer 0
bit 0
Unimplemented: Read as ’0’
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
- n = Value at POR
’1’ = Bit is set
’0’ = Bit is cleared
x = Bit is unknown