Config bits keep changing

General discussion on mikroProg™ programmer and debugger and mikroProg Suite software as well.
Post Reply
Author
Message
Jack Flanders
Posts: 337
Joined: 17 Apr 2008 02:53
Location: Fantasy Land

Config bits keep changing

#1 Post by Jack Flanders » 17 Apr 2012 14:32

I have a PIC18F4682 with a 10MHz crystal. The Project Settings tab has the MCU clock set to 40.000000MHz. When I compile and press F11 for the mikroProg, it opens up with the oscillator config bit set to HS. I change it to HS-PLL and program: all good.

Change some code, compile again, hit F11: the mikroProg screen opens and in a fraction of a second, I see the oscillator config bit change back to HS. The same thing happens if I use Control-F11 (compile/program) in the compiler. If I alt-tab to the mikroProg screen and click on the Write button, it does not change back to HS config bit. Using alt-tab to program is a work-around but this needs some attention.

Jack Flanders
Posts: 337
Joined: 17 Apr 2008 02:53
Location: Fantasy Land

Re: Config bits keep changing

#2 Post by Jack Flanders » 17 Apr 2012 15:11

Investigating more, I find that using alt-tab to get to the mikroProg screen and then clicking on Write does not work. Rather, it programs the target with the previously loaded hex file, not the one that just compiled. Clicking on Reload Hex does import the latest hex file but simultaneously changes the oscillator config bit back to HS mode.

So every time I compile and program, I must:
a) alt-tab to the mikroProg screen
b) click on Reload Hex
c) click on oscillator config bit and change it to HS-PLL
d) click on write

instead of:
a) type control-F11 in the compiler

Am I doing something wrong here? Why does mikroProg continue to change back to default oscillator config bit? Is this a problem with the compiler not saving the config bit correctly? I'm using mikroBasicPRO for PIC, v5.60

Jack Flanders
Posts: 337
Joined: 17 Apr 2008 02:53
Location: Fantasy Land

Re: Config bits keep changing

#3 Post by Jack Flanders » 17 Apr 2012 17:49

:|
Could it be... "Edit Project" settings in the compiler? Specifically "4X PLL Enable"? :!:

I just noticed that :oops:

I'm at work now but will test that setting when I get home tonight. I'm guessing that is what I missed.

Jack Flanders
Posts: 337
Joined: 17 Apr 2008 02:53
Location: Fantasy Land

Re: Config bits keep changing

#4 Post by Jack Flanders » 18 Apr 2012 02:25

Now that I know where to set the config bits in the compiler, there is no problem with mikroProg!

I will try harder next time. No, really, I will. :wink:

Sorry for the false alarm, ME!

Post Reply

Return to “mikroProg™ programmer and debugger”