MikroElektronika PIC Microcontrollers PIC16 Ficha de datos Pagina 72

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 194
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 71
Programming PIC Microcontrollers in BASIC - mikroElektronika
Description The function returns the current operation mode of CAN.
Example
CANGetOperationMode
5.2.4.3 CANSPIInitialize – Initializes CANSPI
Prototype
sub procedure CANSPIInitialize(dim SJW as byte, dim BRP as byte, dim
PHSEG1 as byte, dim PHSEG2 as byte, dim PROPSEG as byte, dim
CAN_CONFIG_FLAGS as byte)
Description The procedure initializes CAN module. CAN must be in Configuration mode or else these values will be
ignored.
Parameters:
SJW value as defined in 18XXX8 datasheet (must be between 1 thru 4)
BRP value as defined in 18XXX8 datasheet (must be between 1 thru 64)
PHSEG1 value as defined in 18XXX8 datasheet (must be between 1 thru 8)
PHSEG2 value as defined in 18XXX8 datasheet (must be between 1 thru 8)
PROPSEG value as defined in 18XXX8 datasheet (must be between 1 thru 8)
CAN_CONFIG_FLAGS value is formed from constants (see below)
Output:
CAN bit rate is set. All masks registers are set to '0' to allow all messages.
Filter registers are set according to flag value:
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (30 sur 112)05/11/2004 02:20:52
Vista de pagina 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 193 194

Comentarios a estos manuales

Sin comentarios