Autor Tema: PALABRAS DE CONFIGURACION PIC18f458  (Leído 2278 veces)

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

Desconectado Gokuden

  • PIC16
  • ***
  • Mensajes: 100
PALABRAS DE CONFIGURACION PIC18f458
« en: 30 de Octubre de 2004, 20:27:00 »
Saludos cordiales, recien compre un pic 18f458 y el programa que uso para programarlo es el IC-PROG este programa me pide 8 palabras de configuración adicionales, se refieren a tipo de oscilador, etc investigue un poco y consegui la siguiente configuración:

#1 = F1FF - XT oscillator, oscillator switch off. Change the 1 to a 3 for HS oscillator.

#2 = FEFC- Disable watchdog timer, no brownout detection, and power on delay.

#3 = FFFF - CCP2 mux with RC1

#4 = FFFA - No debug, disable Low-voltage ICSP, no reset on stack overflow

#5-#7 = FFFF - No code protection or EPROM protection

VALOR ID=FFFFFFFFFFFFFFFF


Tambien consegui esta otra:


#1 = FAFF  

#2-#7 = FFFF

VALOR ID=FFFFFFFFFFFFFFFF

En ambos casos el micro se comporto de una manera extraña, el programa lo q hace es encender un led espera 1 segundo y luego lo apaga y se repite el ciclo…. El micro hace esto correctamente lo extraño es que el retardo que hice fue para 1 segundo y dura 13 segundos ejecuntadolo!!!!! este mismo programa en un 16f877 funciona bien.. Tengo 1 resonador de 4 megas y uso una rutina Standard de retardo de 1 segundo!!!! Por favor si alguien me puede decir la manera correcta de configurar el micro lo agradecere mucho!!! Gracias!!! Y saludos nuevamente!!!...


Desconectado Gokuden

  • PIC16
  • ***
  • Mensajes: 100
RE: PALABRAS DE CONFIGURACION PIC18f458
« Respuesta #2 en: 31 de Octubre de 2004, 08:07:00 »
umm, igual no solvento mis dudas nocturno. estoy haciendolo por su datashett y no nos da nada. y estuvimos investigando y mostraban unas palabras de configuracion ya pero para otro 18, las copiamos y pegamos e respondio pero no como debe ser, esta lento, la rutina de 1seg dura 13 segundos. y debe ser algo en la configuracion, lo unico qe deseo es dejarlo sin Wdt, sin PWoR y con el oscilador XT. no se nada de esa identifiacion..

Desconectado Sispic

  • Moderadores
  • PIC24H
  • *****
  • Mensajes: 1700
    • winpic800
RE: PALABRAS DE CONFIGURACION PIC18f458
« Respuesta #3 en: 31 de Octubre de 2004, 08:36:00 »
Los 18Fxxx tienen 7 words con el valor de los bits de configuración .
y se definen en ensamblador partiendolo en bytes , asea la parte alta y la baja del word .


ejemplo.

__CONFIG  _CONFIG1H, _HS_OSC_1H & _OSCS_OFF_1H  
__CONFIG  _CONFIG2L, _BOR_OFF_2L & _PWRT_OFF_2L     
__CONFIG  _CONFIG2H, _WDT_OFF_2H
__CONFIG  _CONFIG7L, 0xFF      
__CONFIG  _CONFIG7H, 0xFF  

Y aqui estan todas las posivilidades sacado del P18F458.inc

Codigo:

;Configuration Byte 1H Options
_OSCS_ON_1H       EQU  H"DF"   ; Oscillator Switch enable
_OSCS_OFF_1H      EQU  H"FF"

_LP_OSC_1H        EQU  H"F8"   ; Oscillator type
_XT_OSC_1H        EQU  H"F9"
_HS_OSC_1H        EQU  H"FA"
_RC_OSC_1H        EQU  H"FB"
_EC_OSC_1H        EQU  H"FC"   ; External Clock w/OSC2 output divide by 4
_ECIO_OSC_1H      EQU  H"FD"   ; w/OSC2 as an IO pin (RA6)
_HSPLL_OSC_1H     EQU  H"FE"   ; HS PLL
_RCIO_OSC_1H      EQU  H"FF"   ; RC w/OSC2 as an IO pin (RA6)

;Configuration Byte 2L Options
_BOR_ON_2L        EQU  H"FF"   ; Brown-Out Reset enable
_BOR_OFF_2L       EQU  H"FD"
_PWRT_OFF_2L      EQU  H"FF"   ; Power-Up Timer enable
_PWRT_ON_2L       EQU  H"FE"
_BORV_25_2L       EQU  H"FF"   ; BOR Voltage - 2.5v
_BORV_27_2L       EQU  H"FB"   ;               2.7v
_BORV_42_2L       EQU  H"F7"    ;               4.2v
_BORV_45_2L       EQU  H"F3"   ;               4.5v

;Configuration Byte 2H Options
_WDT_ON_2H        EQU  H"FF"   ; Watch Dog Timer enable
_WDT_OFF_2H       EQU  H"FE"
_WDTPS_128_2H     EQU  H"FF"   ; Watch Dog Timer PostScaler count
_WDTPS_64_2H      EQU  H"FD"
_WDTPS_32_2H      EQU  H"FB"
_WDTPS_16_2H      EQU  H"F9"
_WDTPS_8_2H       EQU  H"F7"
_WDTPS_4_2H       EQU  H"F5"
_WDTPS_2_2H       EQU  H"F3"
_WDTPS_1_2H       EQU  H"F1"

;Configuration Byte 4L Options
_DEBUG_ON_4L      EQU  H"7F"    ; Enabled
_DEBUG_OFF_4L     EQU  H"FF"    ; Disabled

_LVP_ON_4L        EQU  H"FF"    ; Enableda
_LVP_OFF_4L       EQU  H"FB"    ; Disabled

_STVR_ON_4L       EQU  H"FF"   ; Stack over/underflow Reset enable
_STVR_OFF_4L      EQU  H"FE"

;Configuration Byte 5L Options
_CP0_ON_5L           EQU  H"FE"    ; Enabled
_CP0_OFF_5L          EQU  H"FF"    ; Disabled

_CP1_ON_5L           EQU  H"FD"    ; Enabled
_CP1_OFF_5L          EQU  H"FF"    ; Disabled

_CP2_ON_5L           EQU  H"FB"    ; Enabled
_CP2_OFF_5L          EQU  H"FF"    ; Disabled

_CP3_ON_5L           EQU  H"F7"    ; Enabled
_CP3_OFF_5L          EQU  H"FF"    ; Disabled

;Configuration Byte 5H Options
_CPB_ON_5H           EQU  H"BF"    ; Enabled
_CPB_OFF_5H          EQU  H"FF"    ; Disabled

_CPD_ON_5H           EQU  H"7F"    ; Enabled
_CPD_OFF_5H          EQU  H"FF"    ; Disabled

;Configuration Byte 6L Options
_WRT0_ON_6L          EQU  H"FE"    ; Enabled
_WRT0_OFF_6L         EQU  H"FF"    ; Disabled

_WRT1_ON_6L          EQU  H"FD"    ; Enabled
_WRT1_OFF_6L         EQU  H"FF"    ; Disabled

_WRT2_ON_6L          EQU  H"FB"    ; Enabled
_WRT2_OFF_6L         EQU  H"FF"    ; Disabled

_WRT3_ON_6L          EQU  H"F7"    ; Enabled
_WRT3_OFF_6L         EQU  H"FF"    ; Disabled

;Configuration Byte 6H Options
_WRTB_ON_6H          EQU  H"BF"    ; Enabled
_WRTB_OFF_6H         EQU  H"FF"    ; Disabled

_WRTC_ON_6H          EQU  H"DF"    ; Enabled
_WRTC_OFF_6H         EQU  H"FF"    ; Disabled

_WRTD_ON_6H          EQU  H"7F"    ; Enabled
_WRTD_OFF_6H         EQU  H"FF"    ; Disabled

;Configuration Byte 7L Options
_EBTR0_ON_7L         EQU  H"FE"    ; Enabled
_EBTR0_OFF_7L        EQU  H"FF"    ; Disabled

_EBTR1_ON_7L         EQU  H"FD"    ; Enabled
_EBTR1_OFF_7L        EQU  H"FF"    ; Disabled

_EBTR2_ON_7L         EQU  H"FB"    ; Enabled
_EBTR2_OFF_7L        EQU  H"FF"    ; Disabled

_EBTR3_ON_7L         EQU  H"F7"    ; Enabled
_EBTR3_OFF_7L        EQU  H"FF"    ; Disabled

;Configuration Byte 7H Options
_EBTRB_ON_7H         EQU  H"BF"    ; Enabled
_EBTRB_OFF_7H        EQU  H"FF"    ; Disabled



Si usas winPic800 , te sera mas facil allar estos bits si quieres hacerlo manualmente  y provar .

Desconectado Gokuden

  • PIC16
  • ***
  • Mensajes: 100
RE: PALABRAS DE CONFIGURACION PIC18f458
« Respuesta #4 en: 31 de Octubre de 2004, 15:06:00 »
YA VEo, me puse a revisar esas conrfig a penas monte el pic  y las vi en el satasheep, aun asi no nos sirve, ustedes nos saben porque esta todo tan lento¿? porque la rutina normal de 1seg en 877 y 84 funcionan y en el 18f458 dura 13 segundos¿?...  tendra algo que ver con un registro de config que me cambia estos tiempos¿?