How to use the internal oscillator on the PIC16F88

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
paulm
Posts: 36
Joined: Mon Mar 28, 2011 9:37 pm

How to use the internal oscillator on the PIC16F88

Post 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

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: How to use the internal oscillator on the PIC16F88

Post 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
Martin

paulm
Posts: 36
Joined: Mon Mar 28, 2011 9:37 pm

Re: How to use the internal oscillator on the PIC16F88

Post 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

Ahmed Abdullfattah
Posts: 1
Joined: Sat Mar 02, 2013 12:23 pm

Re: How to use the internal oscillator on the PIC16F88

Post 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

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times

Re: How to use the internal oscillator on the PIC16F88

Post 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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Post Reply