It is currently 23 Aug 2017 19:15

All times are UTC + 1 hour




Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: 28 May 2014 08:38 
Offline

Joined: 23 May 2012 05:19
Posts: 29
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)


Top
 Profile  
 
PostPosted: 22 Oct 2014 09:23 
Offline

Joined: 06 May 2013 16:16
Posts: 18
removed..


Top
 Profile  
 
PostPosted: 02 Dec 2015 06:53 
Offline

Joined: 06 May 2015 15:07
Posts: 40
Is it possible to use 83.3 kBaud transmition speed? I can not calulate with this baudrate


Top
 Profile  
 
PostPosted: 02 Dec 2015 15:39 
Offline
mikroElektronika team
User avatar

Joined: 11 Mar 2015 12:48
Posts: 1697
Hi Nikitos,

I believe that I answer you here:
viewtopic.php?f=72&t=66240&p=265266#p265266

Best regards,
Aleksandar


Top
 Profile  
 
PostPosted: 08 Jul 2016 21:06 
Offline

Joined: 02 Jul 2016 19:43
Posts: 10
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


Top
 Profile  
 
PostPosted: 08 Jul 2016 21:14 
Offline

Joined: 02 Jul 2016 19:43
Posts: 10
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.


Top
 Profile  
 
PostPosted: 11 Jul 2016 08:59 
Offline
mikroElektronika team
User avatar

Joined: 11 Mar 2015 12:48
Posts: 1697
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


Top
 Profile  
 
PostPosted: 11 Nov 2016 23:06 
Offline

Joined: 11 Jun 2015 15:39
Posts: 6
Location: Canada
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

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: