Datasheet

Programming PIC Microcontrollers in BASIC - mikroElektronika
Description If at least one empty transmit buffer is found, given message is queued for the transmission. If none found,
FALSE value is returned. CAN must be in Normal mode.
Parameters:
id - CAN message identifier. Only 11 or 29 bits may be used depending on message type (standard or extended)
Data - array of as bytes up to 8 as bytes in length
DataLen - Data length from 1 thru 8
CAN_TX_MSG_FLAGS - Value formed from constants (see section below)
Example
aa1 = CAN_TX_PRIORITY_0 and ' form value to be used
CAN_TX_XTD_FRAME and ' with CANSPIWrite
CAN_TX_NO_RTR_FRAME
CANSPIWrite(-1, data, 1, aa1)
5.2.4.8 CANSPIRead – Extracts and reads the message
Prototype
sub function CANSPIRead(dim byref id as longint, dim byref Data as byte
[8], dim byref DataLen as byte, dim byref CAN_RX_MSG_FLAGS as byte) as byte
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (35 sur 112)05/11/2004 02:20:52