18f452 ile ilgili ?

Başlatan Fixxer, 28 Ağustos 2007, 15:36:48

Fixxer

herkeze kolay gelsin arkadaşlar 877 için yaptığım bir programı 877 de plcc kılıfını bulmadığım için 18452 ye çekmek istedim ama bir sürü hata verdi

:arrow: Warning[207] c:\php\untitled.asm87: found label after column 1.(device)
error[122]c:\php\untitled.asm87: illlegal opcode(pic18f452)


mpasm da tanıltılmış durumda.

@ DEVICE pic18F452
@ DEVICE pic18F452, WDT_on
@ DEVICE pic18F452, PWRT_ON
@ DEVICE pic18F452, PROTECT_OFF
@ DEVICE pic18F452, XT_OSC
acaba başka bir sorunmu var  :roll:
...............................

uzaylivolkan

config ayarlarınıda programda bu şekilde düzenleyebilirsin
asm 
    __CONFIG _CONFIG1H, _HS_OSC_1H ; HS osc 
    __CONFIG _CONFIG2L, _BOR_ON_2L & _BORV_27_2L & _PWRT_ON_2L ; Enable Brown out voltage detect 
; Brown out voltage threshold 2.7 Volt 
    __CONFIG _CONFIG2H, _WDT_OFF_2H   ; Disable watch dog timer 
    __CONFIG _CONFIG3H, _CCP2MX_OFF_3H  ; Use default PORTC.1 for CCP2 
    __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L ; enable stack overflow 
; disable low-voltage programming mode 
; disable background debugger 
    __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L  ; disable code protect (user block) 
    __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H   ; disable code protect (boot block) 
    __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L 
; disable write protect (user block) 
    __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H  ; disable Write protect CONFIG regs 
; disable write protect boot block 
; disable write protect Data EE 
   __CONFIG _CONFIG7L, _EBTR0_OFF_7L   ; Disable table Read protect user block 
   __CONFIG _CONFIG7H, _EBTRB_OFF_7H   ; Disable Read protect boot block enable 
endasm





18F452.INC dosyasını bu şekilde düzenle
;****************************************************************
;*  18F452.INC                                                  *
;*                                                              *
;*  By        : Leonard Zerman, Jeff Schmoyer                   *
;*  Notice    : Copyright (c) 2004 microEngineering Labs, Inc.  *
;*              All Rights Reserved                             *
;*  Date      : 01/27/04                                        *
;*  Version   : 2.45                                            *
;*  Notes     :                                                 *
;****************************************************************
        NOLIST
    ifdef PM_USED
        LIST
        "Error: PM does not support this device.  Use MPASM."
        NOLIST
    else
        LIST
        LIST p = 18F452, r = dec, w = -311, f = inhx32
        INCLUDE "P18F452.INC"   ; MPASM  Header
       ; __CONFIG    _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
       ; __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
       ; __CONFIG    _CONFIG4L, _LVP_OFF_4L
        NOLIST
    endif
        LIST
EEPROM_START	EQU	0F00000h
BLOCK_SIZE	EQU	8