hi, sorry if this post rambles a bit but i want to make sure i give the details! first i have looked and worked hard to try and sort this myself but now i am at the point where i am out of ideas and going in circles, so let me explain.
on say the 18f4685 chip, when you do the pragma setting for the OSC you can set it to use the internal OSC and have the OSC2 pin as a CLK output, so you can use a oscilloscope on the pin and you can see the internal clk frequency by x4 the oscilloscope frequency on the OSC2 pin.
i am using the 30f4013 chip and i wanted to do the same setup, but i cant seem to find how to set it, i have looked in both the datasheet and familly ref sheet and the device H file, i will post screen shots so you can see the sections and i will explain why i am confused.
first off the OSC section of the datasheet starts on page 133 and it comes under the system integration section! (took me ages to find it as i was expecting it to have it's own section!)
i should point out that at the moment i am setting fuses by the config menu in MPLAB and not by pragma directive
anyway i am using FRC setting wich gives me (approx)8Mghz internal clock, but i am convinced its not running at correct speed hence why i want to chk it using OSC2pin,
now the second pic shows the next table in the datasheet
from that you can see that for my setting it says
Note 1:
OSC2 pin function is determined by (FPR<4:0>)
now first problem i cant find FPR in the mplab watch window or under SFR in MPLAB so question 1 is how to you view how the bits are set for FPR when debugging?
AHHHHHH wait a min!! i was about to post a screen shot from the family ref sheet and from the device H file BUT, maybe i have the answer staring at me! on the table ive noticed this
ERC External RC oscillator, OSC2 pin is FOSC/4 output(3)
although i am using FRC in the H file ive noticed this under the FOSC fuses
_FOSC(CSW_ON_FSCM_OFF & FRC & ERC);
so to me it looks like i can use that setting and get internal CLK but FOSC/4 on the OSC2 pin.
now before i try this does anybody else agree with my reasoning??? reason i ask is i have already bricked one chip trying to set the fuses in software so i dont want to brick my last chip lol
i wont post all the stuff i was going to as i am pretty sure that is the answer but i would like it clarified
have speant 2 days trying to work it out but hopefuly i am almost there
.
on say the 18f4685 chip, when you do the pragma setting for the OSC you can set it to use the internal OSC and have the OSC2 pin as a CLK output, so you can use a oscilloscope on the pin and you can see the internal clk frequency by x4 the oscilloscope frequency on the OSC2 pin.
i am using the 30f4013 chip and i wanted to do the same setup, but i cant seem to find how to set it, i have looked in both the datasheet and familly ref sheet and the device H file, i will post screen shots so you can see the sections and i will explain why i am confused.
first off the OSC section of the datasheet starts on page 133 and it comes under the system integration section! (took me ages to find it as i was expecting it to have it's own section!)
i should point out that at the moment i am setting fuses by the config menu in MPLAB and not by pragma directive
anyway i am using FRC setting wich gives me (approx)8Mghz internal clock, but i am convinced its not running at correct speed hence why i want to chk it using OSC2pin,
now the second pic shows the next table in the datasheet

from that you can see that for my setting it says
Note 1:
OSC2 pin function is determined by (FPR<4:0>)
now first problem i cant find FPR in the mplab watch window or under SFR in MPLAB so question 1 is how to you view how the bits are set for FPR when debugging?
AHHHHHH wait a min!! i was about to post a screen shot from the family ref sheet and from the device H file BUT, maybe i have the answer staring at me! on the table ive noticed this
ERC External RC oscillator, OSC2 pin is FOSC/4 output(3)
although i am using FRC in the H file ive noticed this under the FOSC fuses
_FOSC(CSW_ON_FSCM_OFF & FRC & ERC);
so to me it looks like i can use that setting and get internal CLK but FOSC/4 on the OSC2 pin.
now before i try this does anybody else agree with my reasoning??? reason i ask is i have already bricked one chip trying to set the fuses in software so i dont want to brick my last chip lol
i wont post all the stuff i was going to as i am pretty sure that is the answer but i would like it clarified
have speant 2 days trying to work it out but hopefuly i am almost there
.