Hello, i'm new to PIC programming and am using MPLAB with the Hi-Tech C compiler. I'm confused about firstly, how to set the PIC clock / oscillator and secondly, what values to actually use. I'm trying to use an internal oscillator.
I've gone through the datasheet for the PIC im using (16F88) and rather arbitrarily decided to use an internal oscillator of 4MHz, i've then configured the register accordingly.
Then when I was using MPLAB I went into the 'configuration bits' tab and noticed there was a setting called oscillator that was already set into code. My program so far looks like:
So, do I still need to manually set the value of the OSCON register or is that already taken care of by the configuration bits? And what exactly does it mean when it says 'INTRC-OSC2 as RA6', if it's set up internally, why does it need to use Pin RA6?
Any help is much appreciated, thanks.
I've gone through the datasheet for the PIC im using (16F88) and rather arbitrarily decided to use an internal oscillator of 4MHz, i've then configured the register accordingly.
Then when I was using MPLAB I went into the 'configuration bits' tab and noticed there was a setting called oscillator that was already set into code. My program so far looks like:
So, do I still need to manually set the value of the OSCON register or is that already taken care of by the configuration bits? And what exactly does it mean when it says 'INTRC-OSC2 as RA6', if it's set up internally, why does it need to use Pin RA6?
Any help is much appreciated, thanks.