Greetings !
I have been using mikro c for some weeks and havent used internal osc. I am having a problem with the configuration and using the datasheet is confusing. I need help configuring my PIC16F887A and pls make reference to the data so that I dont ask again
Thanks!
void main() {
/* Set the internal clock to 8 Mhz */
OSCCON = 0x70;
/* x110xxxx = 4 Mhz */
/* x111xxxx = 8 Mhz*/
// Rest of Code goes Here
}
To answer your question the PIC16F887 datasheet [Didn't find A] has INT I/O or INT Clock out. I would use Internal I/O unless you need the clock out frequency/4. The datasheet talks about internal osc on page in the overview on the right side of the page. On page 62, it talks about the OSCCON register and has bits 6-4 binary '111' so, the 0x70 above should work as long as you have the configuration word set to internal osc.
thanks
OSCCON =0 X 70;
did not compile in mikro c.
as for my configuration,
I took oscilator as HS, Power up timer: oFF, Wdt: off clock : 8Mhz ... but It didnt work without cristal.
I also tried oscilator : XT which worked realy slow without crystal...
Im a bit comfused
That's 0x70 with no spaces. Configuration should be set to internal oscillator IO. See the attached picture and files. The below MikroC file compiled just fine, so I assume you were using spaces as you typed above. If you still have problems, I'll get back to you in about 10-12 hours, as I need to lay down and get some sleep.
SIr,
I got what you are saying,
it seems that pic16f877a does not have such options on it
which i think means that it does not have internal oscillator;
the only option I can see there are RC, Hs, Lf, and Tx,
thaks for your time, and if there is anything i need know about this pic, pls I am still watching this thread