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)
CAN Calculator Tool Released on Libstock!
Re: CAN Calculator Tool Released on Libstock!
Is it possible to use 83.3 kBaud transmition speed? I can not calulate with this baudrate
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: CAN Calculator Tool Released on Libstock!
Hi Nikitos,
I believe that I answer you here:
http://www.mikroe.com/forum/viewtopic.p ... 66#p265266
Best regards,
Aleksandar
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!
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
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!
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.
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.
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: CAN Calculator Tool Released on Libstock!
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
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!
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
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);