3 can controller, Mob scanning – Rainbow Electronics ATmega64C1 User Manual

Page 173

Advertising
background image

173

7647A–AVR–02/08

ATmega32/64/M1/C1

16.3

CAN Controller

The CAN controller implemented into ATmega32/64/M1/C1 offers V2.0B Active.

This full-CAN controller provides the whole hardware for convenient acceptance filtering and
message management. For each message to be transmitted or received this module contains
one so called message object in which all information regarding the message (e.g. identifier,
data bytes etc.) are stored.

During the initialization of the peripheral, the application defines which messages are to be sent
and which are to be received. Only if the CAN controller receives a message whose identifier
matches with one of the identifiers of the programmed (receive-) message objects the message
is stored and the application is informed by interrupt. Another advantage is that incoming remote
frames can be answered automatically by the full-CAN controller with the corresponding data
frame. In this way, the CPU load is strongly reduced compared to a basic-CAN solution.

Using full-CAN controller, high baudrates and high bus loads with many messages can be
handled.

Figure 16-5. CAN Controller Structure

CAN Channel

Gen. Control
Gen. Status
Enable MOb
Interrupt

Bit Timing
Line Error
CAN Timer

LCC

MAC

PLS

Internal

TxCAN

Internal
RxCAN

M a i l b o x

Message Objets

MOb0

MOb1

MOb2

MOb i

Control
Status
IDtag+IDmask
Time Stamp

Control
Status
IDtag+IDmask
Time Stamp

Control
Status
IDtag+IDmask
Time Stamp

Control
Status
IDtag+IDmask
Time Stamp

Buffer MOb0

Buffer MOb1

Buffer MOb2

Buffer MOb i

CAN Data Buffers

Size=120 Bytes

Low priority

High priority

MOb

Scanning

Advertising