Jump to content
Sign in to follow this  
Guest Joe

Interrupts Dont Work In Simulator

Recommended Posts

Guest Joe

Hi,

 

Tested some simple code in the simulator for the 12F targets, and the TMR0 interrupt is never triggered.

 

This could be by design, i dont know.

// for 12F629
#include <system.h>

unsigned char a = 5;
unsigned char b = 10;

void interrupt()
{
 while(a > 0)
 {
   nop();   // place break point here
 }
}

void main(void)
{
 tmr0 = 0xfe;
 option_reg = 0x00; // prescaller 2:1
 intcon = 160;

 for(;;)
 {
   nop();
 }
}// end of main

 

 

The break point is never hit although it should be hit after 4 clock cycles.

 

 

 

 

Joe

Edited by Joe

Share this post


Link to post
Share on other sites

Joe,

 

This is not a bug, but a know limitation.

 

The PIC12s with 14Bit instruction cores do not have peripheral device simulation in the simulator :(

 

Support for PIC12 with 14Bit instruction cores was only recently added to BoostC compiler.

 

No doubt it will get added in the future.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...