Page 3 of 3

Re: CAN Calculator Tool Released on Libstock!

Posted: 28 May 2014 08:38
by jkjoy
My concern is the bit rate calculation.
As per what I understood, there is a mismatch in CANculator parameters when comparing Data sheet calculation. That is why I attached the data sheet page in my previous post.
I can hardly measure the bit timing with my old CRO.

Below is the CANculator parameters for 50kbps@20MHz

const unsigned int SJW = 1;
const unsigned int BRP = 10;
const unsigned int PHSEG1 = 8;
const unsigned int PHSEG2 = 3;
const unsigned int PROPSEG = 8;

But when I manually calculate the Bit time with the below equation in the datasheet, I get 45kbps instead of 50kbps.

TQ = (2 * (BRP+1)) /20,000,000
Bit time = TQ* (Sync_Seg+PROPSEG+PHSEG1+PHSEG2)

Re: CAN Calculator Tool Released on Libstock!

Posted: 22 Oct 2014 09:23
by Scorpio
removed..

Re: CAN Calculator Tool Released on Libstock!

Posted: 02 Dec 2015 06:53
by Nikitos
Is it possible to use 83.3 kBaud transmition speed? I can not calulate with this baudrate

Re: CAN Calculator Tool Released on Libstock!

Posted: 02 Dec 2015 15:39
by Aleksandar.Mitrovic
Hi Nikitos,

I believe that I answer you here:
http://www.mikroe.com/forum/viewtopic.p ... 66#p265266

Best regards,
Aleksandar

Re: CAN Calculator Tool Released on Libstock!

Posted: 08 Jul 2016 21:06
by wdalen
Can you please give an example for 1Mb baudrate dor CAN,
I use a Can-1 clickboard 5v, on a stm clicker2 board stm32f40..

I try to use different frequenties and i get only a empty sheet

Thanks

Re: CAN Calculator Tool Released on Libstock!

Posted: 08 Jul 2016 21:14
by wdalen
Please can you give an example for a clicker-2 with can-1 5v clickboad.
I like to use 1mb baudrate but my sheet stay empty.

I try different values but the max i can use is 500mb

Thanks for the answer.

Re: CAN Calculator Tool Released on Libstock!

Posted: 11 Jul 2016 08:59
by Aleksandar.Mitrovic
Hi,

Have you tried to use CANCalculator for calculation based on the baud rate, frequency, delay and other:
http://libstock.mikroe.com/projects/view/360/canculator

Kind regards,
Aleksandar

Re: CAN Calculator Tool Released on Libstock!

Posted: 11 Nov 2016 23:06
by Dany79
I need to communicate with a program I created a long time ago and I can not change the can initialization.

Is it possible to find the communication speed from the CAN initialization sequence?

mcu frequency 20mzh
pic18 with internal can

Thank you

Dany

Code: Select all

const SJW = 1;
const BRP = 3;
const PHSEG1 = 3;
const PHSEG2 = 3;
const PROPSEG = 1;
const CAN_CONFIG_FLAGS := _CAN_CONFIG_SAMPLE_THRICE and                          // form value to be used
                                 _CAN_CONFIG_PHSEG2_PRG_ON and                          // with CANInit
                                 _CAN_CONFIG_XTD_MSG and
                                 _CAN_CONFIG_DBL_BUFFER_ON and
                                 _CAN_CONFIG_VALID_XTD_MSG;

CANInitialize(SJW, BRP, PHSEG1, PHSEG2, PROPSEG, CAN_CONFIG_FLAGS);