PLL Enabling Problem in 18f14k22
Posted: Thu Dec 01, 2016 7:53 pm
Hi,
I am using PIC18f14K22 in my project.I want to use 16MHz internal Oscilator with PLL enable.
But OSCTUNE.PLLEN bit did not working.
I have write C code at the beginning in flowchart with these parameters, osccon = 0b01110110; osctune = 0b01011111;
and flash a led with 500ms delay in flowchart.and got 4 test using oscilloscope.
1st test with osctune = 0b01011111; //enable pllen bit
2nd test with osctune = 0b00011111; // disable pllen bit
3rd test with //osctune = 0b01011111;
4th test using timer0 at 1:128 prescaler (122.07Hz),using one counting variable,if variable >=61 , led on, otherwise off, if Variable=122,reset to zero.
Every test shown 1Hz frequency on scope.
I have also define frequecy in C code at the top # define _xtal_freq=16000000;
but same result at all.
Note: There is no external crystal attached in my circuit.
OSCCON , OSCTUNE register in datasheet and Config option shown below.
Best Reagrds
Sysprofessional
I am using PIC18f14K22 in my project.I want to use 16MHz internal Oscilator with PLL enable.
But OSCTUNE.PLLEN bit did not working.
I have write C code at the beginning in flowchart with these parameters, osccon = 0b01110110; osctune = 0b01011111;
and flash a led with 500ms delay in flowchart.and got 4 test using oscilloscope.
1st test with osctune = 0b01011111; //enable pllen bit
2nd test with osctune = 0b00011111; // disable pllen bit
3rd test with //osctune = 0b01011111;
4th test using timer0 at 1:128 prescaler (122.07Hz),using one counting variable,if variable >=61 , led on, otherwise off, if Variable=122,reset to zero.
Every test shown 1Hz frequency on scope.
I have also define frequecy in C code at the top # define _xtal_freq=16000000;
but same result at all.
Note: There is no external crystal attached in my circuit.
OSCCON , OSCTUNE register in datasheet and Config option shown below.
Best Reagrds
Sysprofessional