PDA

View Full Version : Incorrect assumptions about 16F1827 config fuses?



J. Mark Wolf
- 1st November 2010, 22:21
Forgive me if this issue has been beaten to death, but I can't seem to get past it, and I've pored over old posts trying to get it straight.

The 16F1827 device, is apparently not directly supported by the PBP assembler, so I am forced to select "MPASM"as the assembler, otherwise the program won't compile.

My assumption is that MPASM would "like" the "ASM/ENDASM" config syntax in the Blinky program below.

4901

As you can see, just the two lines of config (straight from the .inc file) generates two "overwriting" errors.

If I comment the ASM/ENDASM lines out, and enable the rest of the lines, no errors occur and the LED blinks fine.

Help me understand, please, when this ASM/ENDASM fuse config syntax would be appropriate, and when it would not.

ScaleRobotics
- 2nd November 2010, 00:36
When you set your configs inside your code, you must edit out the defaults that are contained in your c:/pbp/16f1827.inc file. Otherwise, they will try to overwrite eachother, and you will get the errors you got.

Check out this page, especially the "don't forget" part....

http://www.picbasic.co.uk/forum/content.php?r=157-Presetting-Configuration-Fuses-(PIC-Defines)-into-your-Program

(Mpasm is a must with this chip, but it is also the way to go. Most of the includes files written here require it as well).

Walter