Multisim and Ultiboard

Showing results for 
Search instead for 
Did you mean: 

MCU RETFIE at address 0x00000 -- using PICC lite


i need help with my project (PIC16F84A)
i wonder why i get a RETFIE at the address 0x00000 ( disassembled )
here is the beast (4 first lines):
;[ADDR ] HEXOP  LABEL: Disassembly             
 [00000] 0009   u14, _isr, int_func, l5, int_entry: RETFIE                  
 [00001] 018C   LB1    CLRF    0xc             
 [00002] 018D          CLRF    0xd             
 [00003] 2BD7          GOTO    _main    

it seems that the real problem is that the interrupt routine is always located at address 0x00000 but i don't know how to correct the problem.

Here is  my source :

#include "pic.h"

#define bitset(var,bitno) ((var) |= 1 << (bitno))  //set a bit to 1
#define bitclr(var,bitno) ((var) &= ~(1 << (bitno))  //set a bit to 0
#define bank0    bitclr(STATUS,RP0)    //select bank0
#define bank1    bitset(STATUS,RP0)    //select bank1

const char option_reg = 0b11000000;      //Option register
const char intcon_reg = 0b10010000;      //intcon register
const char tmr0_reg   = 0x01;       //tmr0 initial state

void init_ports(void);

/*************************************MAIN ROUTINE**********************************************/
//asm("FNROOT _main");
void main()
 INTCON = 0x00;

 OPTION = option_reg; // disable pullups and int. settings.
 TMR0 = tmr0_reg;  //init. interrupt timer.
 INTCON = intcon_reg;  //enables TMR0 and RB0 int.

 while(1); //wait for interuptions forEVER !!



void interrupt isr(void)
 //nothing at the moment


void init_ports(void)

 TRISB = 0x01;   //set port b as all input except B0

  PORTB = 0x00;    //set port b's outputs as 00000000





0 Kudos
Message 1 of 3
Problem only present when  "interrupt" keyword is used.
0 Kudos
Message 2 of 3

I think there is an issue with this instruction in the current release, I tried another code that has ‘interrupt” and got an error message as well, I will let R&D know.



Multisim Support

Tien P.

National Instruments
0 Kudos
Message 3 of 3