Try this
#CONFIG
__CONFIG _CONFIG1H, _OSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _BBSIZ_BB2K_4L & _XINST_OFF_4L
#ENDCONFIG
Try this
#CONFIG
__CONFIG _CONFIG1H, _OSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _BBSIZ_BB2K_4L & _XINST_OFF_4L
#ENDCONFIG
Dave
Always wear safety glasses while programming.
thanks,
Yes that compiles OK
I turned the WDT off though. don't know what the other options are....
where can I get the reference on these options? they don't look like the ones in the INFO file.
what is the CONFIG1H through CONFIG4L about. Is that something in the microchip files?
To get the complete or correct configuration information you need to look at the, for this chip, P18F6722.INC file. This is in
C:\Program Files\Microchip\MPASM Suite
Do not modify this file, the info is near the end.
The CONFIG1H through CONFIG4L is just different places the various bit are stored.
Dave
Always wear safety glasses while programming.
I usually try to turn off as much stuff as possible. I figure they cost overhead that I could use for my own program instead.
Then I turn features on as I need them 'cause I often turn off too much stuff.
Robert
EDIT: Maybe this might shed some light on features:
http://www.picbasic.co.uk/forum/cont...-for-Beginners
Last edited by Demon; - 1st September 2012 at 23:21.
I know, but don't features generate more code if they are active?
PWM, USB, etc.
Robert
EDIT: An example of unnecessary overhead:
I rarely use ADC, apparently having it on for nothing would consume current needlessly (probably very little, but still).ADON: ADC Enable bit
1 = ADC is enabled
0 = ADC is disabled and consumes no operating current
Last edited by Demon; - 3rd September 2012 at 06:20.
The ADC is not in the configs as this thread was about.
But you you are correct about some of the "features".
Dave
Always wear safety glasses while programming.
Long time ago there was the idea of having an "auto" configurator maybe through graphic environment, for the chip that the user uses and some of the good folks here were trying to figure out how to do this.
I suppose that it was a bit of a headache and the project quietly was abandoned.
Maybe it is time to start it over again.
Ioannis
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks