at89c51cc02ua-tdsum ATMEL Corporation, at89c51cc02ua-tdsum Datasheet - Page 90

no-image

at89c51cc02ua-tdsum

Manufacturer Part Number
at89c51cc02ua-tdsum
Description
At89c51cc02, T89c51cc02 Enhanced 8-bit Microcontroller With Can Controller And Flash
Manufacturer
ATMEL Corporation
Datasheet
CAN Autobaud and
Listening Mode
Routine Examples
90
AT/T89C51CC02
To activate the Autobaud feature, the AUTOBAUD bit in the CANGCON register must
be set. In this mode, the CAN controller is only listening to the line without acknowledg-
ing the received messages. It cannot send any message. The error flags are updated.
The bit timing can be adjusted until no error occurs (good configuration find).
In this mode, the error counters are frozen.
To go back to the standard mode, the AUTOBAUD bit must be cleared.
Figure 45. Autobaud Mode
1. Init of CAN macro
// Reset the CAN macro
// Disable CAN interrupts
// Init the Mailbox
}
}
// Configure the bit timing
CANGCON = 01h;
ECAN
ETIM
for num_page =0; num_page <4; num_page++
CANBT1 = xxh
CANBT2 = xxh
CANBT3 = xxh
{
CANPAGE = num_channel << 4;
CANCONCH = 00h
CANSTCH = 00h;
CANIDT1 = 00h;
CANIDT2 = 00h;
CANIDT3 = 00h;
CANIDT4 = 00h;
CANIDM1 = 00h;
CANIDM2 = 00h;
CANIDM3 = 00h;
CANIDM4 = 00h;
for num_data =0; num_data <8; num_data++)
CANGCON.3
AUTOBAUD
TxDC
RxDC
{
CANMSG = 00h;
= 0;
= 0;
1
0
4126L–CAN–01/08
TxDC
RxDC

Related parts for at89c51cc02ua-tdsum