cancel
Showing results for 
Search instead for 
Did you mean: 

Configurable clock output

carnett1
Associate II
Posted on December 13, 2010 at 20:41

I would like some information on configuring Port E0 to be a clock output of 4Mhz. Is their an example someplace.

charles

3 REPLIES 3
brazov22
Associate II
Posted on December 18, 2010 at 09:51

// configures CPU clock @4 MHz

CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);

(, , );

(

);

();

lowpowermcu
Associate II
Posted on December 20, 2010 at 17:10

Hi brazov,

I am not sure but I think that the HSI oscillator is set to 16 MHz so we need to do the following config in order to output 4 MHz on CCO pin:

CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV4);

instead of

CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);

What do you think ?

Regards,

MCU Lüfter

brazov22
Associate II
Posted on December 21, 2010 at 15:22

yes for sure, it was a typo error