Migrating from Atmel C51/CAN: T89C51CC01,
AT89C51CC03 To Atmel AVR/CAN: AT90CAN128,
AT90CAN64, AT90CAN32
Introduction
This application note is a guide, on the CAN controller, to help current T89C51CC01,
AT89C51CC03 users convert existing designs to AT90CAN128, AT90CAN64,
AT90CAN32. The CAN controller used in T89C51CC01/AT89C51CC03 and the CAN
controller used in AT90CAN128 are almost identical. this application note presents
their differences and helps users take advantage of additional features.
Check the datasheets of these products for detailed information.
Same CAN controller
The CAN controller implemented into AT89C51CC01, AT89C51CC03, AT90CAN128,
AT90CAN64, AT90CAN32 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 mes-
sage object in which all information regarding the message (e.g. identifier, data bytes
etc.) is stored.
During the initialization of the peripheral, the application defines which messages are
to be sent and which are to be received. When the CAN controller receives a mes-
sage whose identifier matches the identifiers of the programmed message objects, the
message is stored and an interrupt occurs.
Another advantage is that incoming remote frames can be answered automatically by
the full-CAN controller with the corresponding data frame. In this way, 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.
The CNHPMOB and BOFF registers have been added to the following products
AT90CAN128, AT90CAN64, AT90CAN32
BOFF (Bus OFF Mode)
BOFF gives the information of the state of the CAN channel. Only entering in bus Off
mode generates the BOFFIT interrupt.
CANHPMOB (CAN Highest Priority MOB Register)
This register offer the possibility to quickly manage the MOB having the highest prior-
ity in CANSIT registers.
AVR/CAN controller = C51/CAN controller + BOFFIT + CANHPMOB
7528A–CAN–06/05
CAN, 80C51,
AVR,
Microcontroller
Application Note
2
7528A–CAN–06/05
Application Note
Error
Management
The Bus Off Interrupt Flag (BOFFIT) in the AT90CAN128, AT90CAN64, AT90CAN32 provides
functionality concerning error management not available in the AT89C51CC01 and
AT89C51CC03 as illustrated in the following diagrams.
Figure 1. Line Error Mode on AT89C51CC01, AT89C51CC03
Figure 2. Line Error Mode on AT90CAN128, AT90CAN64, AT90CAN32