bryan1
Well-Known Member
Hiya Guy's,
I'm working on a project using a 16f777 pic mainly as it has 3 pwn modules and last night I noticed on the datasheet it also has an internal programmable oscillator upto 8 mhz. Now for the question I'm using mplab 7.10 which gives me the window to set the config bits in which I set the osc to INTRC as Port I/O. But on reading the datasheet I need to set the OSCCON register to 01101110 to set it to 4 mhz. Now this is where I'm confused :shock: do I set the OSCCON register at the start of the program or in the header file. As this is a new chip I haven't found any code on the net using this pic to use as a guide. If anyone can help out on this sticky point I have I'll be greatfull.
Cheers Bryan
I'm working on a project using a 16f777 pic mainly as it has 3 pwn modules and last night I noticed on the datasheet it also has an internal programmable oscillator upto 8 mhz. Now for the question I'm using mplab 7.10 which gives me the window to set the config bits in which I set the osc to INTRC as Port I/O. But on reading the datasheet I need to set the OSCCON register to 01101110 to set it to 4 mhz. Now this is where I'm confused :shock: do I set the OSCCON register at the start of the program or in the header file. As this is a new chip I haven't found any code on the net using this pic to use as a guide. If anyone can help out on this sticky point I have I'll be greatfull.
Cheers Bryan