Change CAN Baudrate

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Noisten
Posts: 2
http://meble-kuchenne.info.pl
Joined: Fri Feb 09, 2024 7:44 am

Change CAN Baudrate

Post by Noisten »

Hello guys,
i have a Problem sending a CAN Telegram with two different Baudrates.
The internal CAN of PIC18F26K80 must switch between 125kbit and 250kbit.
I found out that BRGCON register 1 (variable BAUD1) have to change form 3 to 7.
But there is no macro doing that and my C skills are not very good :?

Can somewone help me with this?

medelec35
Matrix Staff
Posts: 1988
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 660 times

Re: Change CAN Baudrate

Post by medelec35 »

Hello.
If you right-click on the Can component that is on the 2D panel and select help.
You will be directed to the Wiki.
If you look at the ChangeRate function it shows:
ChangeRate function.png
ChangeRate function.png (9.5 KiB) Viewed 1316 times
Therefore the ChangeRate macro allows what you are inquiring about.
Martin

Noisten
Posts: 2
Joined: Fri Feb 09, 2024 7:44 am

Re: Change CAN Baudrate

Post by Noisten »

Hi, thanks for your answer.
I test the macro but it only work with external CAN and MCP2515. I want to use the internal controller of the 18F26K80.

Post Reply