Page 1 of 1

How to use the internal oscillator on the PIC16F88

Posted: Thu Apr 11, 2013 9:54 am
by paulm
Hi,

I'm giving a basic course to secondary school teachers in teaching them how to incorporate the PIC into student engineering projects.

I want to make the connections to the PIC as simple as possible an avoid having to use the external oscillator.

I know I can use the internal oscillator by putting a C-Block code into the flowing program and setting osscon appropriately.

However, is there a flowcode (V4) option that allows me to use the internal oscillator without having to use the c-code block as I want to keep this as simple as possible.

I have selected the internal oscillator from the configure menu but it doesn't seem to work.

Rgds,
Paul

Re: How to use the internal oscillator on the PIC16F88

Posted: Thu Apr 11, 2013 11:09 am
by medelec35
Hi Paul.
Without osccon added, the internal osc will only be running at 31.25KHz which is default value.

So for any practical purposes You will need to add at the very start of Main, a cblock with:
osccon=0x60; //4MHz

osccon=0x70; //8MHz

Don't believe its worth bothering with 2MHz or below?

Martin

Re: How to use the internal oscillator on the PIC16F88

Posted: Thu Apr 11, 2013 2:48 pm
by paulm
Hi Martin,

is there documentation anywhere that describes the configuration options within flowcode for the various clocking options?

I can never understand why when you select a certain clock mode in the simple config screen it does not update the clock mode in the expert config screen.

It like they can be totally different from each other and I don't know which ones takes precedence.

Rgds,
Paul

Re: How to use the internal oscillator on the PIC16F88

Posted: Thu Apr 11, 2013 3:17 pm
by Ahmed Abdullfattah
Hello
i have been worked on pic 16f877a but the program size was big so i worked on 18f4550
the simulation is working very well but on the breadboard the LCD doesn't work it just turned on but it didn't receive the program ...i think the problem is the configuration between 16f877a and 18f4550

Re: How to use the internal oscillator on the PIC16F88

Posted: Thu Apr 11, 2013 3:58 pm
by dazz
Hi Ahmed
look at the attached screenshot and after doing the config , make sure you configure the arrowed parts the same , the one in blue is important as if its set to analog as soon as its programmed it switches port b to analogue mode and will not run the lcd
let us know how you get on
Regards
Dazz

Can you also follow the link in my sig to sign up for access to the correct forum thanks

Untitled.jpg
(275.93 KiB) Downloaded 820 times