mikroElektronika PIC Microcontrollers PIC12 User Manual page 155

Mikroc user's manual
Table of Contents

Advertisement

mikroC
making it simple...
CAN Constants
There is a number of constants predefined in CAN library. To be able to use the
library effectively, you need to be familiar with these. You might want to check
the example at the end of the chapter.
CAN_OP_MODE
CAN_OP_MODE
CANSetOperationMode
#define CAN_MODE_BITS
#define CAN_MODE_NORMAL
#define CAN_MODE_SLEEP
#define CAN_MODE_LOOP
#define CAN_MODE_LISTEN
#define CAN_MODE_CONFIG
CAN_CONFIG_FLAGS
CAN_CONFIG_FLAGS
Functions
combination) as their argument:
#define CAN_CONFIG_DEFAULT
#define CAN_CONFIG_PHSEG2_PRG_BIT
#define CAN_CONFIG_PHSEG2_PRG_ON
#define CAN_CONFIG_PHSEG2_PRG_OFF
#define CAN_CONFIG_LINE_FILTER_BIT
#define CAN_CONFIG_LINE_FILTER_ON
#define CAN_CONFIG_LINE_FILTER_OFF
#define CAN_CONFIG_SAMPLE_BIT
#define CAN_CONFIG_SAMPLE_ONCE
#define CAN_CONFIG_SAMPLE_THRICE
#define CAN_CONFIG_MSG_TYPE_BIT
#define CAN_CONFIG_STD_MSG
#define CAN_CONFIG_XTD_MSG
// continues..
MikroElektronika: Development tools - Books - Compilers
mikroC - C Compiler for Microchip PIC microcontrollers
constants define CAN operation mode. Function
expects one of these as its argument:
0xE0
0
0x20
0x40
0x60
0x80
constants define flags related to CAN module configuration.
and
CANInitialize
CANSetBaudRate
// Use it to access mode bits
expect one of these (or a bitwise
0xFF
// 11111111
0x01
// XXXXXXX1
0xFF
0xFE
// XXXXXXX0
0x02
0xFF
// XXXXXX1X
0xFD
// XXXXXX0X
0x04
0xFF
// XXXXX1XX
0xFB
// XXXXX0XX
0x08
0xFF
// XXXX1XXX
0xF7
// XXXX0XXX
page
147

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents