gnupic: pic interrupts
Subject:
Re: pic interrupts
From:
Scott Dattalo ####@####.####
Date:
28 Aug 2000 20:57:51 -0000
Message-Id: <Pine.LNX.4.21.0008281540370.6012-100000@tempest2.blackhat.net>
On Mon, 28 Aug 2000, Andreas Loeffler wrote:
> Hi,
>
> i've a question which is actually not related to gpsim but maybe someone
> can answer it anyhow?
> I enabled global interrupts and the external interrupt the
> interrupt-on-change is disabled like the following:
> GIE=set; // enable global interrupts
> PEIE=clear; //set; // enable peripherial irq
> T0IE=clear; //disable timer 0 interrupt
> INTE=set; //enable rb0/int interrupt
> RBIE=clear; //set; //enable portb interrupt-on-change
> --
> now when the state change on eg. RB4 the flag bit RBIF gets set (as it
> should be) but also INTF gets set. Is this normal?
> I expected only RBIF to be set here, how to avoid INTF to be set (the
> state on RB) remains the same actually)?
INTF should get set if:
INTE = 1
and
RB0 goes from low to high and INTEDG = 1
or
RB0 goes from high to low and INTEDG = 0
Do you see this behavior in gpsim or in a real device? There could be a bug in
gpsim such that a change in any PORTB I/O causes the whole PORTB to be compared
with what ever happens to be stored in the power up value of PORTB. You could
try repeating this experiment several times (in gpsim that is).
Also, are you sure INTF was not set before RB4 changed states?
Scott