FRED_SUN
Joined: 28 Jul 2008 Posts: 7
|
how can I change the baud rate in CAN bus KIT |
Posted: Tue Dec 09, 2008 3:23 pm |
|
|
We buy the CAN BUS kit for our project, but it only works in 125k baud rate, now we need to run it at 500k, what can I do? the file for baud rate setting is:
Code: | void can_set_baud(void) {
BRGCON1.brp=CAN_BRG_PRESCALAR;
BRGCON1.sjw=CAN_BRG_SYNCH_JUMP_WIDTH;
BRGCON2.prseg=CAN_BRG_PROPAGATION_TIME;
BRGCON2.seg1ph=CAN_BRG_PHASE_SEGMENT_1;
BRGCON2.sam=CAN_BRG_SAM;
BRGCON2.seg2phts=CAN_BRG_SEG_2_PHASE_TS;
BRGCON3.seg2ph=CAN_BRG_PHASE_SEGMENT_2;
BRGCON3.wakfil=CAN_BRG_WAKE_FILTER;
} |
I do not know how to handle it, please help me.
Thanks
Fred Sun |
|