PDA

View Full Version : Set Configuration from code?



kevj
- 25th September 2008, 20:58
Is there a way to write the "meProg - Configuration" settings right in my code? Setting the Osc modes, Watchdog timer, Fail safe, etc - all the stuff that pops up in the Configuation window of the melabs Programmer?

I once tried to do this with DEVICE in the code, but PB didn't like that. I don't think I can write to the Config registers in my code after it's already programmed and running - can I?

I chased this once before and gave up, but now I'm using a big 18F for a project and it's got about 40 different Configs - each time I flash it in development, I have to go manually set them all each time. I'd like to flag it so they're automatically set properly from my code.

??

Thanks!

Pic_User
- 25th September 2008, 21:02
Is there a way to write the "meProg - Configuration" settings right in my code? Setting the Osc modes, Watchdog timer, Fail safe, etc - all the stuff that pops up in the Configuation window of the melabs Programmer?

I once tried to do this with DEVICE in the code, but PB didn't like that. I don't think I can write to the Config registers in my code after it's already programmed and running - can I?

I chased this once before and gave up, but now I'm using a big 18F for a project and it's got about 40 different Configs - each time I flash it in development, I have to go manually set them all each time. I'd like to flag it so they're automatically set properly from my code.

??

Thanks! http://www.picbasic.co.uk/forum/showthread.php?t=543: :)

mackrackit
- 25th September 2008, 21:03
Have you read this?
http://www.picbasic.co.uk/forum/showthread.php?t=543

Charles Linquis
- 26th September 2008, 01:49
If you want to do it at runtime, check out

http://www.picbasic.co.uk/forum/showthread.php?t=4093

kevj
- 26th September 2008, 04:52
LOL. Thanks guys. That'll do it.