Is there an easy way to check the clock if it is multiplied using the PLL? I want to confirm that I'm running at 16MHz (4MHz x 4). Will the OSC2 output a 16MHz signal?
Is there an easy way to check the clock if it is multiplied using the PLL? I want to confirm that I'm running at 16MHz (4MHz x 4). Will the OSC2 output a 16MHz signal?
The easiest way I know to check would be with an LED & a few pause statements. If HSPLL isn't running it will be obvious on the LED.
Main:
HIGH LED
PAUSE 500
LOW LED
PASE 500
GOTO Main
OSC2 can output the clock/4, but only in EC mode. In other modes, the signal from OSC2 output is so weak you'll load it with a scope probe.
Would this not enable the x4 PLL?
Code:@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HSPLL_OSC_1H @ __CONFIG _CONFIG2L, _BOR_ON_2L & _PWRT_ON_2L & _BORV_45_2L @ __CONFIG _CONFIG2H, _WDT_ON_2H @ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
It should, but check this with your programmer before programing that part.
Also, you might want to use the osc resistor shown in the datasheet since this may be over driving your crystal. HS uses a higher drive output on OSC2.
Bookmarks