User`s manual
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
These constant values define filter codes. Routine CANSetFilter() requires this
code as one of its arguments. These enumerations must be used by itself i.e. it can-
not be ANDed to form multiple values.
const CAN_FILTER_B1_F1 = 0
const CAN_FILTER_B1_F2 = 1
const CAN_FILTER_B2_F1 = 2
const CAN_FILTER_B2_F2 = 3
const CAN_FILTER_B2_F3 = 4
const CAN_FILTER_B2_F4 = 5
These constant values define flags related to configuring CAN module. Routines
CANInitialize() and CANSetBaudRate() use these codes. One or more these val-
ues may be ANDed to form multiple flags.
const CAN_CONFIG_DEFAULT = $FF
' 11111111
const CAN_CONFIG_PHSEG2_PRG_BIT = $01
const CAN_CONFIG_PHSEG2_PRG_ON = $FF
' XXXXXXX1
const CAN_CONFIG_PHSEG2_PRG_OFF = $FE
' XXXXXXX0
const CAN_CONFIG_LINE_FILTER_BIT = $02
const CAN_CONFIG_LINE_FILTER_ON = $FF
' XXXXXX1X
const CAN_CONFIG_LINE_FILTER_OFF = $FD
' XXXXXX0X
const CAN_CONFIG_SAMPLE_BIT = $04
const CAN_CONFIG_SAMPLE_ONCE = $FF
' XXXXX1XX
const CAN_CONFIG_SAMPLE_THRICE = $FB
' XXXXX0XX
const CAN_CONFIG_MSG_TYPE_BIT = $08
const CAN_CONFIG_STD_MSG = $FF
' XXXX1XXX
const CAN_CONFIG_XTD_MSG = $F7
' XXXX0XXX
const CAN_CONFIG_DBL_BUFFER_BIT = $10
const CAN_CONFIG_DBL_BUFFER_ON = $FF
' XXX1XXXX
const CAN_CONFIG_DBL_BUFFER_OFF = $EF
' XXX0XXXX
const CAN_CONFIG_MSG_BITS = $60
const CAN_CONFIG_ALL_MSG = $FF
' X11XXXXX
const CAN_CONFIG_VALID_XTD_MSG = $DF
' X10XXXXX
const CAN_CONFIG_VALID_STD_MSG = $BF
' X01XXXXX
const CAN_CONFIG_ALL_VALID_MSG = $9F
' X00XXXXX
MikroElektronika:
Development
tools
-
Books
-
Compilers
mikroBASIC
making it simple...
121
page
CAN_FILTER
CAN_CONFIG_FLAGS