MikroElektronika PIC Microcontrollers PIC16 Fiche technique Page 78

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 194
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 77
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 = CANSPIRead(id, Data, 7, 0)
5.2.4.9 CANSPI 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 CANSPI 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 (36 sur 112)05/11/2004 02:20:52
Vue de la page 77
1 2 ... 73 74 75 76 77 78 79 80 81 82 83 ... 193 194

Commentaires sur ces manuels

Pas de commentaire