Owner's manual
Table Of Contents
- 8-bit MCU with CAN controller and Flash
- 1. Description
- 2. Features
- 3. Block Diagram
- 4. Pin Configuration
- 5. SFR Mapping
- 6. Clock
- 7. Program/Code Memory
- 8. Data Memory
- 9. EEPROM data memory
- 10. In-System-Programming (ISP)
- 11. Serial I/O Port
- 12. Timers/Counters
- 13. Timer 2
- 14. WatchDog Timer
- 15. Atmel CAN Controller
- 15.1. Introduction
- 15.2. CAN Controller Description
- 15.3. CAN Controller Mailbox and Registers Organization
- 15.4. IT CAN management
- 15.5. Bit Timing and BaudRate
- 15.6. Fault Confinement
- 15.7. Acceptance filter
- 15.8. Data and Remote frame
- 15.9. Time Trigger Communication (TTC) and Message Stamping
- 15.10. CAN Autobaud and Listening mode
- 15.11. CAN SFR’s
- 15.12. Registers
- 16. Programmable Counter Array PCA
- 17. Analog-to-Digital Converter (ADC)
- 18. Interrupt System
- 19. Electrical Characteristics
- 20. Ordering Information

70 Rev.A - May 17, 2001
Preliminary
T89C51CC02
15.3.1. Working on message objects
The Page message object register (CANPAGE) is used to select one of the 4 message objects. Then, message
object Control (CANCONCH) and message object Status (CANSTCH) are available for this selected message
object number in the corresponding SFRs. A single register (CANMSG) is used for the message. The maibox
pointer is managed by the Page message object register with an auto-incrementation at the end of each access.
The range of this counter is 8.
Note that the maibox is a pure RAM, dedicated to one message object, without overlap. In most cases, it is not
necessary to transfer the received message into the standard memory. The message to be transmitted can be built
directly in the maibox. Most calculations or tests can be executed in the mailbox area.
15.3.2. CAN Controller management
In order to enable the CAN Controller correctly the following registers have to be initialized:
• General Control (CANGCON),
• Bit Timing (CANBT 1,2&3),
• And for each page
- message object Control (CANCONCH),
- message object Status (CANSTCH).
During operation, the CAN Enable message object registers (CANEN) will give a fast overview of the message
object availability.
The CAN messages can be handled by interrupt or polling modes.
A message object can be configured as follows:
• Transmit message object,
• Receive message object,
• Receive buffer message object.
• Disable
This configuration is made in the CONCH field of the CANCONCH register (see Table 20).
When a message object is configured, the corresponding ENCH bit of CANEN register is set.
Table 20. Configuration for CONCH1:2
When a Transmitter or Receiver action of a message object is finished, the corresponding ENCH bit of the CANEN
register is cleared. In order to re-enable the message object, it is necessary to re-write the configuration.
Non-consecutive message objects can be used for all three types of message objects (Transmitter, Receiver and
Receiver buffer),
CONCH 1 CONCH 2 Type of message object
0 0 disable
0 1 Transmitter
1 0 Receiver
1 1 Receiver buffer