How to Setup Configuration bits in code

General discussion on mikroC.
Post Reply
Author
Message
ayhamsysy
Posts: 13
Joined: 30 Jul 2012 12:05

How to Setup Configuration bits in code

#1 Post by ayhamsysy » 06 Aug 2012 17:15

Hi,
I was wondering how can I setup the configs bits in code? , I mean how to write them and where should I put them ? i'm using mikroc pro for pic.

I want to setup the following in order to obtain 48Mhz from 20Mhz.
from page:
http://www.mikroe.com/forum/viewtopic.php?t=10646
the setting:
check _FOSC_HSPLL_HS_1H flag, uncheck _FOSC_INTOSC_HS_1H and _FOSC_HS_1H if checked)

thanks in advance.

hexreader
Posts: 1786
Joined: 27 Jun 2010 12:07
Location: England

Re: How to Setup Configuration bits in code

#2 Post by hexreader » 06 Aug 2012 17:21

ayhamsysy wrote:Hi,
I was wondering how can I setup the configs bits in code?
With MikroC for PIC you cannot set config bits in code. The same is true of the current MikroC pro for PIC compiler.

We all hope that one day it might be possible, but there is no sign that it will happen any time soon, if ever.

You will have to set config manually.

Try putting a request in the "wishlist" forum. Maybe if enough people ask, we may get this one day.

This probably sounds a bit negative against ME, but to balance it out, in my opinion the ME compilers are still great, despite this one little annoyance.

By the way, you need to upgrade to MikroC pro for PIC. The non-pro version is pretty much obsolete.

Warm Regards,

Robin
Last edited by hexreader on 06 Aug 2012 17:28, edited 1 time in total.
Start every day with a smile...... (get it over with) :)

ayhamsysy
Posts: 13
Joined: 30 Jul 2012 12:05

Re: How to Setup Configuration bits in code

#3 Post by ayhamsysy » 06 Aug 2012 17:26

the configuration bit that i want to modify is not found in the "edit project"

hexreader
Posts: 1786
Joined: 27 Jun 2010 12:07
Location: England

Re: How to Setup Configuration bits in code

#4 Post by hexreader » 06 Aug 2012 17:30

ayhamsysy wrote:the configuration bit that i want to modify is not found in the "edit project"
Interesting, I will investigate.

Might take a day or two though, as my brain operates at low speed :)
Start every day with a smile...... (get it over with) :)

ayhamsysy
Posts: 13
Joined: 30 Jul 2012 12:05

Re: How to Setup Configuration bits in code

#5 Post by ayhamsysy » 06 Aug 2012 17:32

thank you.

i'm using 18f4550
the wanted configurations :
check _FOSC_HSPLL_HS_1H flag,
uncheck _FOSC_INTOSC_HS_1H and _FOSC_HS_1H

i want to acces fosc3:fosc1

hexreader
Posts: 1786
Joined: 27 Jun 2010 12:07
Location: England

Re: How to Setup Configuration bits in code

#6 Post by hexreader » 06 Aug 2012 20:50

It is possible and I have done it
Start every day with a smile...... (get it over with) :)

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: How to Setup Configuration bits in code

#7 Post by janko.kaljevic » 07 Aug 2012 08:21

Hello,

All config bits can be set in edit Project window.
Fosc3:Fosc0 can be set under Oscillator Selection field in Edit Project window.

We have added on our wishlist a option to set config bits from code. But for now the only way to set them is in Project->Edit Project window.

Best regards.

sysavm
Posts: 13
Joined: 09 Jun 2014 13:19

Re: How to Setup Configuration bits in code

#8 Post by sysavm » 19 Jul 2014 21:25

Is this functionality added?

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: How to Setup Configuration bits in code

#9 Post by marina.petrovic » 21 Jul 2014 14:17

Hi,

There is no update regarding this functionality yet.

Please, take a look at this forum topic:
http://www.mikroe.com/forum/viewtopic.php?f=88&t=55032

Best regards,
Marina

Miho
Posts: 17
Joined: 17 Jul 2014 11:29

Re: How to Setup Configuration bits in code

#10 Post by Miho » 09 Dec 2015 01:47

Will this functionality be available?

How can I configure automatic code formatting in MikroC?

Thanks.

Post Reply

Return to “mikroC General”