Datasheet

Programming PIC Microcontrollers in BASIC - mikroElektronika
Description If at least one full receive buffer is found, the function extracts and returns the message as byte. If none found,
FALSE value is returned. CAN must be in mode in which receiving is possible.
Parameters:
id - CAN message identifier
Data - array of bytes up to 8 bytes in length
DataLen - Data length from 1 thru 8
CAN_TX_MSG_FLAGS - Value formed from constants (see below)
Example
res = CANRead(id, Data, 7, 0)
5.2.3.9 CAN Library Constants
You need to be familiar with constants that are provided for use with the CAN module. All of the following constants are
predefined in CAN library.
CAN_OP_MODE
These constant values define CAN module operation mode. CANSetOperationMode() routine requires this code. These values
must be used by itself, i.e. they cannot be ANDed to form multiple values.
const CAN_MODE_BITS = $E0 ' Use these to access opmode bits
const CAN_MODE_NORMAL = 0
const CAN_MODE_SLEEP = $20
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (23 sur 112)05/11/2004 02:20:52