mikroElektronika PIC Microcontrollers PIC12 User Manual page 164

Mikroc user's manual
Table of Contents

Advertisement

mikroC - C Compiler for Microchip PIC microcontrollers
CANSPISetBaudRate
Prototype
void CANSPISetBaudRate(char SJW, char BRP, char PHSEG1, char
PHSEG2, char PROPSEG, char CAN_CONFIG_FLAGS);
Description
Sets CANSPI baud rate. Due to complexity of CANSPI protocol, you cannot simply
force a bps value. Instead, use this function when CANSPI is in Config mode. Refer to
datasheet for details.
Parameters:
SJW
BRP
PHSEG1
PHSEG2
PROPSEG
CAN_CONFIG_FLAGS
Requires
CANSPI must be in Config mode; otherwise the function will be ignored.
Example
init = CAN_CONFIG_SAMPLE_THRICE
...
CANSPISetBaudRate(1, 1, 3, 3, 1, init);
page
156
as defined in 18XXX8 datasheet (1–4)
as defined in 18XXX8 datasheet (1–64)
as defined in 18XXX8 datasheet (1–8)
as defined in 18XXX8 datasheet (1–8)
as defined in 18XXX8 datasheet (1–8)
is formed from predefined constants (see CAN constants)
CAN_CONFIG_PHSEG2_PRG_ON
CAN_CONFIG_STD_MSG
CAN_CONFIG_DBL_BUFFER_ON
CAN_CONFIG_VALID_XTD_MSG
CAN_CONFIG_LINE_FILTER_OFF;
MikroElektronika: Development tools - Books - Compilers
&
&
&
&
&
mikroC
making it simple...

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