at89c51cc03c-slsim ATMEL Corporation, at89c51cc03c-slsim Datasheet - Page 103

no-image

at89c51cc03c-slsim

Manufacturer Part Number
at89c51cc03c-slsim
Description
At89c51cc03 Enhanced 8-bit Mcu With Can Controller And Flash Memory
Manufacturer
ATMEL Corporation
Datasheet
4182N–CAN–03/08
2. Configure message object 3 in reception to receive only standard (11-bit identi-
Note:
3. Send a message on the message object 12
// Enable the CAN macro
fier) message 100h
// Select the message object 3
// Enable the interrupt on this message object
// Clear the status and control register
// Init the acceptance filter to accept only message 100h in standard mode
// Enable channel in reception
EA = 1
ECAN = 1
CANGIE = 20h
// Select the message object 12
// Enable the interrupt on this message object
// Clear the Status register
// load the identifier to send (ex: 555h)
// load data to send
// configure the control register
CANGCON = 02h
CANPAGE = 30h
CANIE2 = 08h
CANSTCH = 00h
CANCONCH = 00h
CANIDT1 = 20h
CANIDT2 = 00h
CANIDT3 = 00h
CANIDT4 = 00h
CANIDM1 = FFh
CANIDM2 = FFh
CANIDM3 = FFh
CANIDM4 = FFh
CANCONCH = 88h // enable reception
CANPAGE = C0h
CANIE1 = 01h
CANSTCH = 00h;
CANIDT1 = AAh;
CANIDT2 = A0h;
CANMSG = 00h
CANMSG = 01h
CANMSG = 02h
CANMSG = 03h
CANMSG = 04h
CANMSG = 05h
CANMSG = 06h
CANMSG = 07h
CANCONCH = 18h
To enable the CAN interrupt in reception:
103

Related parts for at89c51cc03c-slsim