Autor Tema: __CONFIG has been deprecated for PIC18 devices  (Leído 3118 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado rmolero_milo

  • PIC10
  • *
  • Mensajes: 1
__CONFIG has been deprecated for PIC18 devices
« en: 19 de Mayo de 2006, 15:36:38 »
HOla a TODOS.
Aprovecho para felicitar a todos los que forman este foro que tanto me ha ayudado. GRACIAS

bueno mi duda es que cuando compilo en el C18 y utilizo el visual Initializer para inicializar mi PIC (18f452), se compila con exito, sin embargo me aparecen una serie de Warnings que no se si afectaran.

Executing: "C:\Archivos de programa\Microchip\mcc18\mpasm\MPASMWIN.exe" /q /p18F452 "init_PIC18F452.asm" /l"init_PIC18F452.lst" /e"init_PIC18F452.err" /o"init_PIC18F452.o"
Warning[230] E:\GETTING STARTED\EXAMPLE 1\INIT_PIC18F452.ASM 20 : __CONFIG has been deprecated for PIC18 devices.  Use directive CONFIG.
Warning[230] E:\GETTING STARTED\EXAMPLE 1\INIT_PIC18F452.ASM 24 : __CONFIG has been deprecated for PIC18 devices.  Use directive CONFIG.


¿que pasa?
¿existe alguna forma de remediarlos o quitarlos?

encontre un documento en le red que algo explica , pero no lo entiendo (de una nota de aplicacion de Microchip 51601a.pdf que es HPC EXPLORER BOARD FAQS AND TROUBLESHOOTING GUIDE) :

FAQ-10 When rebuilding the “8722Demo.mcw” workspace, the following
warning message is generated:
Warning[230] C:\CONFIG.ASM 29 : __CONFIG has been deprecated for PIC18 devices.
Warning[230] C:\CONFIG.ASM 30 : __CONFIG has been deprecated for PIC18 devices.
Warning[230] C:\CONFIG.ASM 31 : __CONFIG has been deprecated for PIC18 devices.
Warning[230] C:\CONFIG.ASM 32 : __CONFIG has been deprecated for PIC18 devices.
Warning[230] C:\CONFIG.ASM 34 : __CONFIG has been deprecated for PIC18 devices.
Warning[230] C:\CONFIG.ASM 35 : __CONFIG has been deprecated for PIC18 devices.
Warning[230] C:\CONFIG.ASM 36 : __CONFIG has been deprecated for PIC18 devices.
The version of MPASM assembler included with MPLAB 7.20 uses a new directive
method for setting the configuration bits in source code. Since this workspace was
originally created using an older version of MPLAB, it will be necessary to comment
out the older __CONFIG directives and use the new CONFIG directive in the
“config.asm” file as shown below.
;(DEPRECATED) __CONFIG _CONFIG1H, _OSC_HSPLL_1H <------ Old method
CONFIG OSC = HSPLL <------ New method
;(DEPRECATED) __CONFIG _CONFIG2L, _BOREN_SBORDIS_2L & _BORV_43_2L &
_PWRT_ON_2L
CONFIG BOREN = OFF
CONFIG PWRT = ON
;(DEPRECATED) __CONFIG _CONFIG2H, _WDT_OFF_2H
CONFIG WDT = OFF
;(DEPRECATED)__CONFIG _CONFIG3L, _MODE_MC_3L
CONFIG MODE = MC
;(DEPRECATED)__CONFIG _CONFIG4L, _LVP_OFF_4L & _DEBUG_OFF_4L &
_XINST_OFF_4L
CONFIG LVP = OFF
CONFIG DEBUG = OFF
CONFIG XINST = OFF
An alternative method is to use the MPLAB C18 version of these directives by
including them in a similar file named config.h as shown below. Note, you will have to
remove the config.asm from the workspace and add a #include “config.h” directive to
the main.c source file.
//CONFIG1L [300001H]
#pragma config OSC = HSPLL
//CONFIG2L [300002L]
#pragma config PWRT = ON
#pragma config BOREN = OFF
//CONFIG2H [300002H]
#pragma config WDT = OFF
//CONFIG3L [300003L]
//CONFIG3H [300003H]
//CONFIG4L [300004L]
#pragma config LVP = OFF
#pragma config DEBUG = OFF
#pragma config XINST = ON
For a complete list of the new PIC18F8722 configuration directives, check the
“MPLAB C18 Complier Addendum” located in the MPLAB C18 web page on the
Microchip web site.



DE ANTEMANO MUCHAS GRACIAS

Desconectado maunix

  • Moderadores
  • DsPIC33
  • *****
  • Mensajes: 4751
    • Mi Sitio Web Personal
Re: __CONFIG has been deprecated for PIC18 devices
« Respuesta #1 en: 19 de Mayo de 2006, 19:51:14 »
e está diciendo que la sentencia __CONFIG no se utiliza para los 18, en su lugar se utiliza la sentencia CONFIG

Aquí te dejo el link del datasheet que te explica como configurar los diferentes configuration bits para cada PIC18xxx.  Cada pic tiene sus detalles y por eso te sugiero le eches un vistazo al datasheet.

MPLAB C18 PIC18 Configuration Settings Addendum
http://ww1.microchip.com/downloads/en/DeviceDoc/C18_Config_Settings_51537e.pdf

Espero te sirva.

Saludos

- La soberbia de un Einstein es entendible.. la de un salame es intolerable (A.Dolina)
- En teoría no hay diferencia entre la teoría y la práctica. En la práctica... si la hay.
- Lee, Lee, Lee y luego pregunta.(maunix)
- Las que conducen y arrastran al mundo no son las máquinas, sino las ideas (V. Hugo)
- Todos los hombres se parecen por sus palabras; solamente las obras evidencian que no son iguales.(Moliere)
- Todo debería ser hecho tan simple como sea posible pero no mas simple que eso.(A.Einstein)

Desconectado Flugplatz

  • Colaborador
  • PIC18
  • *****
  • Mensajes: 279
    • Mi canal de YouTube
Re: __CONFIG has been deprecated for PIC18 devices
« Respuesta #2 en: 06 de Junio de 2006, 16:44:29 »
Con el MPLAB 6.60 y la versión 2.20 del C18, que es con la que he probado yo, se haría así y tirando, en mi caso del 18f452.h

#pragma romdata CONFIG
_CONFIG_DECL(_OSC_HSPLL_1H, _PWRT_ON_2L & _BOR_OFF_2L,_WDT_OFF_2H,_CONFIG3H_DEFAULT,
_LVP_OFF_4L,_CONFIG5L_DEFAULT,_CONFIG5H_DEFAULT,_CONFIG6L_DEFAULT,_CONFIG6H_DEFAULT,
_CONFIG7L_DEFAULT,_CONFIG7H_DEFAULT);
#pragma romdata

A partir de la versión 2.40 ya se usa la sintaxis descrita en el documento anterior
« Última modificación: 06 de Junio de 2006, 17:13:02 por Flugplatz »
Mi canal de YouTube

Un saludo desde Madrid