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.
Config bits keep changing
-
- Posts: 337
- Joined: 17 Apr 2008 02:53
- Location: Fantasy Land
-
- Posts: 337
- Joined: 17 Apr 2008 02:53
- Location: Fantasy Land
Re: Config bits keep changing
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
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
-
- Posts: 337
- Joined: 17 Apr 2008 02:53
- Location: Fantasy Land
Re: Config bits keep changing
Could it be... "Edit Project" settings in the compiler? Specifically "4X PLL Enable"?
I just noticed that
I'm at work now but will test that setting when I get home tonight. I'm guessing that is what I missed.
-
- Posts: 337
- Joined: 17 Apr 2008 02:53
- Location: Fantasy Land
Re: Config bits keep changing
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.
Sorry for the false alarm, ME!
I will try harder next time. No, really, I will.
Sorry for the false alarm, ME!