I'm developing a CAN application using the ECAN driver.
I need to configure the Baudrate among various other things for this purpose and I need to choose an oscillator frequency.
The clock that will run my program, will this always be the 10MHz in the datasheet or can I clock it up to 40MHz using HSPLL(4-times-multiplier)?
Which mode is recommended?
I don't get how you can just multiply up a frequency. Doesn't this have to be done physically?
I'm not quite sure how to change the frequency either. Do I do it with pragmas or by changing registers or both? It seems you can actually change oscillator at runtime...?
If you need 40MHz clock, you need to use a 10MHz oscillator and then use HSPLL.
Frequency multiplication is NOT done physically by you, but is done by the PIC. Make sure you select HSPLL mode in configuration settings.
Do you need to change the frequency at runtime, or is it okay if you just use 40MHz from startup?