AT89C51CC03U-S3SIM ATMEL [ATMEL Corporation], AT89C51CC03U-S3SIM Datasheet - Page 104

no-image

AT89C51CC03U-S3SIM

Manufacturer Part Number
AT89C51CC03U-S3SIM
Description
Enhanced 8-bit MCU with CAN Controller and Flash Memory
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
104
AT89C51CC03
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:
4182I–CAN–06/05

Related parts for AT89C51CC03U-S3SIM