--- fidjouss <> wrote: > > > Hello > > I am trying to read the data from an external device ( assuming that > it doesnt have its internal clock). I am using IRQ (IRQE set to 1 for > edge sensitive to notify me to read the data.I am supposed to read 5 > digits ( will use a delay of 1ms after each reading)to stabilize the > input.so whenever the IRQ (pin) goes low, i read a digit. the problem > i have is when testing the program (using thrsim11 and a switch > attached to IRQ, I turn the switch low(off) and the program jumps to > service the interrupt ( before reaching the RTI, I clear I(CLI)). with > the switch still low (off), the program keeps servicing the same > interrupt. > isnt edge sensitive detected only once since i turned my switch off > only once? why does it keep going back and service the samething? > any suggestions to solve this problem? > or should I try another approach to try to read the data from PORTC > and use a different strobe to notify me that the data is ready to be > read? > > Thanks all > Are you running in single-chip or expanded mode? In those modes, you can only write to IRQE once and it must be within the first 64 cycles after Reset. Setting IRQE after the 64 cycles after Reset has no effect. But yes, in edge-sensitive mode, you only get one interrupt until the IRQ line goes high and drops again. Are you sure you don't get another cycle on the IRQ line between the time you re-enable the interrupts (when you clear the I bit) and when you exit with RTI? Regards, Jim Dodd Onset Computer Corp. __________________________________ |