i've been trying to use the interrupt commands but i get a lot of errors. I used both files
INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts
First error i get is that micro assembler does not support 16F628a, and it is asking to use the MPASM for compiling.
then if i use the MPASM i get again a lot of error like the attached pic.
i dont understand why it says that cannot filnd the pic16f628a.
here is also my code
if you have any suggestion please let me know.Code:'**************************************************************** '* Name : TAG NUMBER.BAS * '* Author : LEONARDO BILALIS * '* Notice : Copyright (c) 2011 [LEONARDOS BILALIS] * '* : All Rights Reserved * '* Date : 11/6/2011 * '* Version : 1.0 * '* Notes : this program allows you to see the * '* : Number of the RFID tag * '* : * '**************************************************************** @ DEVICE PIC16F628a Include "MODEDEFS.BAS" INCLUDE "DT_INTS-14.bas" ' Base Interrupt System INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts CMCON = 7 ;----------------------------------------------------------------- LED VAR PORTB.3 ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _ToggleLED1, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM T1CON = $31 ; Prescaler = 8, TMR1ON @ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts ;----------------------------------------------------------------- DEFINE OSC 8 'Set oscillator in MHz DEFINE LCD_DREG PORTB 'define port to LCD DEFINE LCD_DBIT 4 'RB4 RB5 RB6 RB7 to D4 D5 D6 D7 display DEFINE LCD_RSREG PORTA 'RS on porta DEFINE LCD_RSBIT 0 'RS on porta.0 DEFINE LCD_EREG PORTA 'Enable on porta DEFINE LCD_EBIT 1 'Enable porta.1 DEFINE LCD_BITS 4 ' DEFINE LCD_LINES 2 'lines 2 PAUSE 200 ' Stop 200ms ;---------------------------------- LCDOUT $FE,1 ' power lcd Lcdout $FE,1,4 lcdout $FE, 1," Copyright 2011" lcdout $FE, $C0,"Leonardo Bilalis" ;---------------------------------- pause 1000 low led pause 500 high led pause 500 low led pause 500 high led pause 500 ' -----[ Variables ]------------------------------------------------------- buf VAR byte [10]' RFID bytes buffer tagNum VAR Byte ' from EEPROM table idx VAR Byte ' tag byte index char VAR Byte ' character from table Main: pause 500 lcdout $FE,1," Please use your" lcdout $FE, $C0,"Personal RFIDTAG" pause 500 SERIN2 portb.1, 84, [WAIT($02),Str buf\10] pause 1000 LCDout $fe,1, "TAG ID:" lcdout $fe,$C0, "NO: ", str buf\10 pause 5000 goto main '---[TMR1 - interrupt handler]-------------------------------------------------- ToggleLED1: TOGGLE LED @ INT_RETURN
thanks a lot for your help.




Bookmarks