Hummel 0 Posted March 11, 2003 Report Share Posted March 11, 2003 Bug description: The debugger do not recognize an external interrupt activated by a button plugin (reproduceable). The MPLAB simulator activates the interrupt. Is this a bug of the debugger? Button config: PortB, Pin 0 PicAntIDE version: PicAndIDE 5.0 Compiler: C2C-plus Compiler version: 5.0e OS: Windows 2000 void interrupt( void ) { // Never reached this line... portb = 23; clear_bit( INTCON, INTF); //clear external Interrupt } void main(void) { option_reg = Bit(INTEDG); //interrupt on rising edge trisb = 0x01; portb = 0; enable_interrupt( INTE ); //enable external Interrupt enable_interrupt( GIE ); while(1); //endless loop } Quote Link to post Share on other sites
RobHumphris 0 Posted April 21, 2003 Report Share Posted April 21, 2003 I've had the same problem, running 5.0.4 Buttons connected to PortB are not causing interrupts, the assembled code works in the PIC ide debugger. This concerns me as I was just about to purchase a copy of C2C. Here's the code: #include <p16f877.h> void interrupt( void ) { char intFlags = intcon & 0x07; portd ^= intFlags; intcon = intcon & 0xF8; } main() { option_reg = 0x07; // set prescaler to 1:256 trisd = 0x00; trisb = 0xFF; intcon = 0xB8; while(1) { clear_wdt(); } } Quote Link to post Share on other sites
Hobknob 0 Posted April 22, 2003 Report Share Posted April 22, 2003 The simulator currently simulates: Instruction decoding, ALU, W REG, STATUS register, Program counter, FSR register, RAM File Registers, Stack, TMR0 and EEPROM. Interrupt generation from port b is not currently supported, but will be implemented very soon. Regards Dave Quote Link to post Share on other sites
Recommended Posts
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.