Intel 87C196CB, 8XC196NT user manual Specifying a Message Object’s Configuration

Models: 8XC196NT 87C196CB

1 155
Download 155 pages 42.65 Kb
Page 82
Image 82
7.5.1Specifying a Message Object’s Configuration

CAN SERIAL COMMUNICATIONS CONTROLLER

7.5.1Specifying a Message Object’s Configuration

Each message object configuration register (Figure 7-12) specifies a message identifier type (standard or extended), transfer direction (transmit or receive), and data length (in bytes).

CAN_MSGxCFG

Address:

1Ex6H (x = 1–F)

x = 1–15 (87C196CB)

Reset State:

Unchanged

Program the CAN message object x configuration (CAN_MSGxCFG) register to specify a message object’s data length, transfer direction, and identifier type.

87C196CB

7

DLC3

DLC2

DLC1

DLC0

 

 

 

 

0

DIR

XTD

 

 

 

 

Bit

Bit

 

Function

Number

Mnemonic

 

 

 

 

 

 

7:4

DLC3:0

Data Length Code

 

 

Specify the number of data bytes this message object contains. Valid

 

 

values are 0–8. The CAN controller updates a receive message object’s

 

 

data length code after each reception to reflect the number of data bytes in

 

 

the current message.

 

 

 

3

DIR

Direction

 

 

Specify whether this message object is to be transmitted or is to receive a

 

 

message object from a remote node.

 

 

0

= receive

 

 

1

= transmit

 

 

 

2

XTD

Extended Identifier Used

 

 

Specify whether this message object’s identification registers contain an

 

 

extended (29-bit) or a standard (11-bit) identifier.

 

 

0

= standard identifier

 

 

1

= extended identifier

 

 

 

1:0

Reserved; for compatibility with future devices, write zeros to these bits.

 

 

 

 

Figure 7-12. CAN Message Object x Configuration (CAN_MSGxCFG) Register

Set the XTD bit for a message object with an extended identifier; clear it for a message with a standard identifier. If you accidentally clear the XTD bit for a message that has an extended iden- tifier, the CAN controller will clear the extended bits in the identification register. If you set the XTD bit for a message object, that message object cannot receive message objects with standard identifiers.

For a transmit message, set the DIR bit and write the number of programmed data bytes (0–8) to the DLC field. For a receive message, clear the DIR bit. The CAN controller stores the data length from the received message in the DLC field.

7-21

Page 82
Image 82
Intel 87C196CB, 8XC196NT user manual Specifying a Message Object’s Configuration