beautypg.com

buffer mode, Preliminary – Rainbow Electronics T89C51CC02 User Manual

Page 71

background image

Rev.A - May 17, 2001

71

Preliminary

T89C51CC02

15.3.3. Buffer mode

Any message object can be used to define the buffer, including non-consecutive message objects, and with no
limitation on length.

Each message object of the buffer must be initialized CONCH2 = 1 and CONCH1 = 1;

Figure 58. Buffer mode

The same acceptance filter must be defined for each message object of the buffer. When there is no mask on the
identifier or the IDE, all messages are accepted.

A received frame will always be stored in the lowest free message object.

When the flag Rxok is set on one of the buffer message objects, this message object can then be read by the
application. This flag must then be cleared by the software and the message object re-enabled in buffer reception
in order to free the message object for the next reception.

The OVRBUF flag in the CANGIT register is set when the buffer is full. This flag can generate an interrupt.

The frames following the buffer-full interrupt will not be taken into account until at least one of the buffer message
objects is re-enabled in reception.

This flag must be cleared by the software in order to acknowledge the interrupt.

message object 0

message object 1

message object 2

message object 3

Block buffer

buffer 0

buffer 1