MCRL PIC18F2620

Rispondi
Sandro
Messaggi: 1
Iscritto il: 05/02/2010, 16:23
Home_Page: http://

MCRL PIC18F2620

Messaggio da Sandro »

Ciao a tutti,
ho un problema con un PIC18F2620.
Vorrei disabilitare il MCLR, ma con l'istruzione

Codice: Seleziona tutto

@		DEVICE MCLR_OFF 
ottengo un errore.
Come posso fare? sto impazzendo.... :(
killers83
Messaggi: 2
Iscritto il: 07/02/2010, 15:42
Home_Page: http://

Re: MCRL PIC18F2620

Messaggio da killers83 »

Ciao Sandro.
Compilando con l'MPASM devi disabilitare il MCLR dal file include. Se non ricordo male si chiama PIC18F2620.inc e lo trovi sotto la cartella del PBP.
:geek:
Avatar utente
Boris Landoni
Messaggi: 349
Iscritto il: 04/11/2009, 17:18

Re: MCRL PIC18F2620

Messaggio da Boris Landoni »

Esatto.
Sotto la cartella di installazione del programma (solitamente C:\PBP ) trovi il file 18F2620.INC
lo puoi modificare come segue:

Codice: Seleziona tutto

;****************************************************************
;*  18F2620.INC                                                 *
;*                                                              *
;*  By        : Leonard Zerman, Jeff Schmoyer                   *
;*  Notice    : Copyright (c) 2006 microEngineering Labs, Inc.  *
;*              All Rights Reserved                             *
;*  Date      : 06/05/06                                        *
;*  Version   : 2.47                                            *
;*  Notes     :                                                 *
;****************************************************************
        NOLIST
    ifdef PM_USED
        LIST
        "Error: PM does not support this device.  Use MPASM."
        NOLIST
    else
        LIST
        LIST p = 18F2620, r = dec, w = -311, f = inhx32
        INCLUDE "P18F2620.INC"	; MPASM  Header
        __CONFIG    _CONFIG1H, _OSC_INTIO67_1H
        __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
        __CONFIG    _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
        __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
        NOLIST
    endif
        LIST
EEPROM_START	EQU	0F00000h
BLOCK_SIZE	EQU	8
Le configurazioni necessarie le trovi nel file
P18F2620.INC
che si prova nella cartella dell'MPASM solitamente
C:\Programmi\Microchip\MPASM Suite
Rispondi