PDA

View Full Version : CONFIG directive warning help



josegamez
- 7th August 2006, 18:46
Hello. I`m currently working on a project at my university and it involves the use of a PIC. This is the first time that me and my lab partners have ever used PICs, but because of the nature of the project and our specific needs we were forced to choose a large and high speed PIC. So please excuse my ignorance but we never got a chance to start out with a simple PIC and we are in sort of a rush. We chose the PIC18lf458 because it had those characteristics and we are trying to use PICBasic Pro with MicroCode Studio IDE to make at least programming the PIC easier. However, since we are completely new to the PICs and PBP world we are experiencing some problems and we have some doubts. We tried to compile a simple program with an infinite loop that turns on and off a LED and we got this error message:

MPASM Required
The PICMicro Assembler does not support the 18F458 microcontroller. You need to use MPASM in order to compile your PICBasic program.

So we installed MPLab and set the path in the "Compile and Program Options" Assembler dialogue and compilation seemed to complete successfully but we got these warning messages.

Warning[230] c:\pbp246\18f458.inc 20:__CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] c:\pbp246\18f458.inc 21:__CONFIG has been deprecated for PIC18 devices. Use directive CONFIG
Warning[230] c:\pbp246\18f458.inc 22:__CONFIG has been deprecated for PIC18 devices. Use directive CONFIG

So we need help in fixing this problem to be able to compile without any warnings. To tell the truth I donīt even understand the warning so I don't know if its something serious or not. Thank you very much in advance for your time and help. God bless you.

Bruce
- 7th August 2006, 19:55
See this thread http://www.picbasic.co.uk/forum/showthread.php?p=13087#post13087

josegamez
- 8th August 2006, 19:54
Thanks a lot Bruce! That warning made me feel uncomfortable because I didn't know if it wasn't going to work just because of it, now we can work peacefully :)

Bruce
- 8th August 2006, 20:02
You're welcome.

FYI: You can disable this annoying warning by adding w = -230 to the default
18f458.inc file in your PBP install directory.

LIST p = 18F458, r = dec, w = -311, w = -230, f = inhx32

MeLabs has updated all default 18F header files with this switch in the latest
version. If you're using an older version of PBP (pre v2.47) just alter the .inc file.