FlowCode V5 for PIC - internal oscillator issue

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
iamwhoiam
Posts: 4
Joined: Mon May 14, 2012 5:31 pm

FlowCode V5 for PIC - internal oscillator issue

Post by iamwhoiam »

Hi all. I am trying to find the correct option in FlowCode 5 for PIC, to set the INTERNAL oscillator for my PIC 16F628A, and it is SO confusing!

Here is where I go, in FlowCode: "Build >> Project options >> General (tab) >> Configure chip"

The options I see for the oscillator are pretty confusing, considering I am used to "INTRC NOCLKOUT" or similair. Would someone be kind enough to show me which option means "internal oscillator, NO clock output", please, as this is bemusing at the very least.

Thank you, God bless :-)

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: FlowCode V5 for PIC - internal oscillator issue

Post by medelec35 »

Hi iamwhoiam,
You need to select

Code: Select all

INTOSC I/O
(INTernal OSCillator with RA6 as Input/Output)

Don't forget to disable

Code: Select all

Watchdog Timer
and

Code: Select all

Low Voltage Programming

Martin
Martin

iamwhoiam
Posts: 4
Joined: Mon May 14, 2012 5:31 pm

Re: FlowCode V5 for PIC - internal oscillator issue

Post by iamwhoiam »

medelec35 wrote:Hi iamwhoiam,
You need to select

Code: Select all

INTOSC I/O
(INTernal OSCillator with RA6 as Input/Output)

Don't forget to disable

Code: Select all

Watchdog Timer
and

Code: Select all

Low Voltage Programming

Martin
Thanks! :D

Talk about ambiguous design - they NEED to fix that, and make it abundantly clear what it means. It's all very well THEM knowing (the designers of flowcode) but why not just stick to industry standard descriptions and designations, instead of thinking up and implementing some obscure acronym :-S LOL

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Steve »

iamwhoiam wrote:It's all very well THEM knowing (the designers of flowcode) but why not just stick to industry standard descriptions and designations, instead of thinking up and implementing some obscure acronym
For information, we use configuration naming conventions provided by Microchip.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Genilsonsa »

Hello use Flowcode 5'm wanting to use the internal oscillator used an icon in c OSCCON = 0x60 and when I compile with the error?

Teste.c (148: 2): error: identifier unknown 'OSCCON'
Teste.c (148: 2): error: invalid operand 'OSCCON'
Teste.c (148: 8): error: failed to generate expression

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Genilsonsa »

This is the program I want to use the internal oscillator 4mhz.Podem help me?
Attachments
TESTE.fcf
(6.5 KiB) Downloaded 348 times

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: FlowCode V5 for PIC - internal oscillator issue

Post by STibor »

Hi,
Not include the controller "osccon" register.
Internal 4MHz clock by default.
PCON register sets the bit OSCF (1bit) or 4MHz (0bit) from 48kHz.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Genilsonsa »

Hello sorry so many perguntas.Para use the internal oscillator I no longer use the ICON C "OSCCON = 0 x 60"?

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: FlowCode V5 for PIC - internal oscillator issue

Post by STibor »

Hello,
Not be used to delete the C code macro or write c code before // characters.
// Post code is not interpreted by the compiler.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Benj »

Hello,

Instead of this.

Code: Select all

OSCCON = 0X60 ;
Try this.

Code: Select all

osccon = 0x60;
Note that the register name and the x in 0x is now lowercase and should now be recognised by the compiler.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Genilsonsa »

Hello moderators and colleagues tested the internal oscillator configured pic 16F628A and INTOSC and put a ICON in C lowercase letter OSCCON = 0x60; .Testei error when compiling the program with the same pic 16F88 and is compiled normalmente.Isso bug Flowcode? Someone can help me?

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Genilsonsa »

Every time I compile the error !!!!!!!!!!!!!! If I compile with PIC 16F88 always compile successfully
Attachments
TESTE.fcf
(6.5 KiB) Downloaded 279 times

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: FlowCode V5 for PIC - internal oscillator issue

Post by medelec35 »

Hi Genilsonsa,
No it's not a bug.
STibor wrote:Not include the controller "osccon" register.
Internal 4MHz clock by default.
PCON register sets the bit OSCF (1bit) or 4MHz (0bit) from 48kHz.
&
STibor wrote:Hello,
Not be used to delete the C code macro or write c code before // characters.
// Post code is not interpreted by the compiler.
Both statements are absolutely correct!

16F628A only have an internal dual speed oscillator and the default is 4MHz ( 16F828A uses PCON register which by default set at 8 = 4MHz)
This means there is no osccon register that is used like there are in other devices to select desired internal osc speed.

to work at 4MHz.

For your flowchart to compile you must remove osccon C code block as it's not required.
With no osccon register within your target device, you will get an error if left in.

If your hardware is not working then you have some other issue.
Martin

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Genilsonsa »

Medelec35 Hello thanks for replying and I'm looking on the forums for days trying to understand how to use the internal oscillator and had not gotten a clear explanation so that you deu.Vou test the program in practice to see if it falls to certo.Muito Thanks

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times

Re: FlowCode V5 for PIC - internal oscillator issue

Post by Genilsonsa »

I auditioned with internal oscillator with pic 16F628A and worked here redondinho.Agradeço everyone who helped .Very Thanks

Post Reply