CAN Calculator Tool Released on Libstock!

CANculator is a software development tool used for easier CAN baud rate calculation and manipulation of the CAN bus parameters.
Author
Message
jkjoy
Posts: 29
Joined: 23 May 2012 05:19

Re: CAN Calculator Tool Released on Libstock!

#31 Post by jkjoy » 28 May 2014 08:38

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)

Scorpio
Posts: 18
Joined: 06 May 2013 16:16

Re: CAN Calculator Tool Released on Libstock!

#32 Post by Scorpio » 22 Oct 2014 09:23

removed..

Nikitos
Posts: 40
Joined: 06 May 2015 15:07

Re: CAN Calculator Tool Released on Libstock!

#33 Post by Nikitos » 02 Dec 2015 06:53

Is it possible to use 83.3 kBaud transmition speed? I can not calulate with this baudrate

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: CAN Calculator Tool Released on Libstock!

#34 Post by Aleksandar.Mitrovic » 02 Dec 2015 15:39

Hi Nikitos,

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

Best regards,
Aleksandar

wdalen
Posts: 10
Joined: 02 Jul 2016 19:43

Re: CAN Calculator Tool Released on Libstock!

#35 Post by wdalen » 08 Jul 2016 21:06

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

wdalen
Posts: 10
Joined: 02 Jul 2016 19:43

Re: CAN Calculator Tool Released on Libstock!

#36 Post by wdalen » 08 Jul 2016 21:14

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.

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: CAN Calculator Tool Released on Libstock!

#37 Post by Aleksandar.Mitrovic » 11 Jul 2016 08:59

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

Dany79
Posts: 12
Joined: 11 Jun 2015 15:39
Location: Canada

Re: CAN Calculator Tool Released on Libstock!

#38 Post by Dany79 » 11 Nov 2016 23:06

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);

Post Reply

Return to “CAN Calculator”