[SOLVED] Can baud rate 500 kbps with mikroc pro

Status
Not open for further replies.

desgin

Full Member level 1
Joined
Apr 7, 2017
Messages
96
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Visit site
Activity points
813
Hello all,

I need to send and receive CAN frames by 500 KBPS to communicate with CAR.
I am working with mikroC Pro software, i have licence also.
I am able to set 125/250 but not 500 KBPS.
In my hardware i am using 20 MHZ crystal, i need to change it ?
For my software setting i am attaching Screenshot.
Where to change in configuration ?

Please help me, i am using PIC18f46k80 Micro controller.
In can calculator, not able to show anything with this value, for that also i attached 1 file.
 

In my hardware i am using 20 MHZ crystal, i need to change it ?
I am only a hobby coder and do not own that PIC, but it seems to me that the answer is yes.

Datasheet states maximum processor frequency as 64 MHz, so 20 MHz seems really slow.

I would use 16MHz crystal and turn on PLL to give 64 MHz clock, or maybe 15MHz crystal for 60 MHz.

Maybe those frequencies are not suited to your supply voltage - maybe there are limitations for your set-up
 
Reactions: desgin

    desgin

    Points: 2
    Helpful Answer Positive Rating
ECAN module input frequency must be an integer multiply of 16*bit rate, thus 20 MHz crystal doesn't work for 500 kBaud.
 
Reactions: desgin

    desgin

    Points: 2
    Helpful Answer Positive Rating

So i am changing my Crystal from 20 MHz to 16 MHz but what changes i have to do in Software ? PLL - Enable ?
That's all will work ?
Please help me, Is my project setting is correct ?
I attached pic, check and reply!!
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…