Hi,
The problem is that previously there was two different ways of setting the CONFIG bits depending on which assembler you were using. With the introduction of PBP3 both those ways got superseded by a, MUCH better, third way.
With PBP3, which you must have since you've been using the #CONFIG/#ENDCONFIG directives the easiest way is to look in the DEVICE_REFERENCE folder and open up the .INFO file for your particular device. There you will find two things, A) What PBP is using by default and B) All the options available. Just remember that whenever you put the #CONFIG/#ENDCONFIG in your program ALL of the PBP default settings will be replaced so make sure that you either include a setting for all selections or know what they are by (hardware) default.
Yet another option is to use the new meCONFIG from meLabs and let it generate the CONFIG code for you.
The internal oscillator of the 16F628A is 4MHz by default, and there is no oscillator register setting, only a frequency select bit in PCON, so you shouldn't need to do "anything" really - except for selecting it of course. The .INFO file for the 16F628A shows two selections INTRC_OSC_NOCLKOUT and INTOSC_OSC_NOCLKOUT however they both result in the same thing, namely that the two LSB's of the CONFIG word being cleared which matches the datasheet for the INTOSC with I/O on RA6/RA7 selection.
My pic has a 14 bit config and I want 10000111111000 but I cannot figure out the command to enter it....
This, however does not look correct if what you want is the internal oscillator. As far as I can see this would select external low power crystal mode - not internal oscillator.
Then, in your actual code you had
Code:
#CONFIG
__config 10000111100001
#ENDCONFIG
Which again doens't look correct, this would select XT-oscillator.
So, please clarify which mode it is you want. If it's the internal oscillator then the code in the original post looks fine to me. There are no analog functions on PortB.
Which device programmer are you using? Are you sure that it's actually programming the CONFIG bits into the device?
/Henrik.
EDIT: OK, you posted while I was researching and typing.
Bookmarks