Ho iniziato da poco a giocare con i PIC e gia' incontro le prime cose strane. Prima cosa nel Mpasm 2.15 non è presente il pic16f84a ma solo il 16f84. Ci sono versioni successive del compilatore? Seguendo Tanzilli ho scaricato sia il p16f84.inc che il file asm21500.zip. Compilando il programma LED.ASM su un Pc con W2000, a parte le segnalazioni riportate sotto il compilatore crea il file hex.
MPASM 02.15 Released LED.ASM 1-31-2006 8:48:57 PAGE 1
LOC OBJECT CODE LINE SOURCE TEXT VALUE
00001 ;
************************************************** 00002 ; Pic by example 00003 ; LED.ASM 00004 ; 00005 ; (c) 2004, Sergio Tanzilli 00006 ;
formatting link
00007 ;
************************************************** 00008 Warning[215]: Processor superceded by command line. Verify processor symbol. 00009 PROCESSOR 16F84A 00010 RADIX DEC 00011 INCLUDE "P16F84A.INC" 00001 LIST 00002 ; P16F84A.INC Standard Header File, Version 2.00 Microchip Technology, Inc. Message[301]: MESSAGE: (Processor-header file mismatch. Verify selected processor.)
Su un altro Pc con W98SE invece non riesco a compilare. Segue inizio e fine del file LST.
MPASM 02.15 Released LED.ASM 1-30-2006 20:16:58 PAGE 1
LOC OBJECT CODE LINE SOURCE TEXT VALUE
00001 ;
************************************************** 00002 ; Pic by example 00003 ; LED.ASM 00004 ; 00005 ; (c) 2004, Sergio Tanzilli 00006 ;
formatting link
00007 ;
************************************************** 00008 Error[132] : Unknown processor (16F84A) 00009 PROCESSOR 16F84A 00010 RADIX DEC 00011 INCLUDE "P16F84A.INC" 00001 LIST 00002 ; P16F84A.INC Standard Header File, Version 2.00 Microchip Technology, Inc. Message[301]: MESSAGE: (Processor-header file mismatch. Verify selected processor.) 00134 LIST 00012 ERRORLEVEL -302 00013 00014 ;Setup of PIC configuration flags 00015 00016 ;XT oscillator 00017 ;Disable watch dog timer 00018 ;Enable power up timer 00019 ;Disable code protect 00020 Error[131] : Processor type is undefined 00021 __CONFIG 0x3FF1 00022 00000000 00023 LED EQU 0 00024 Error[147] : Directive not allowed when generating an object file (ORG) 00025 ORG 0x0C 00026 Error[150] : Labels must be defined in a code or data section when making an object file
0000 00027 Count RES 2 00028 00029 ;Reset Vector 00030 ;Start point at CPU reset 00031 Error[147] : Directive not allowed when generating an object file (ORG) 00032 ORG 0x00 00033 Warning[207]: Found label after column 1. (bsf) Error[122] : Illegal opcode (STATUS) 00034 bsf STATUS,RP0 00035 Warning[207]: Found label after column 1. (movlw) Error[122] : Illegal opcode (B) 00036 movlw B'00011111' Warning[207]: Found label after column 1. (movwf) Error[122] : Illegal opcode (TRISA) 00037 movwf TRISA 00038
......................CUT
Errors : 31 Warnings : 21 reported, 0 suppressed Messages : 1 reported, 0 suppressed
C'e' qualche problema di compatibilita' tra MPASM e W98?
Grazie
-------------------------------- Inviato via
formatting link