Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/15/00 18:21
Read: times


 
#6529 - External - 0 interrupt ??
Hi all

I have to use external-0 interrupt. It has to be edge type.

The requirement is to measure a certain number of interrupts, say x and then do some action.

But it is probelmatic.

always it does the action at x-1 or x-2 times the interrupt has been detected rather than at exaxt x ??


I have used following instructions:

Setb ex0 ; enable external-0 interrupt
setb ea ; enable global interrupts
setb it0 ; make external-0 edge type.


;ex0 ISR
========

Inc counter
mov a,counter
cjne a,#x,no_action

Action
sjmp exit

no_action

exit

reti


Please correct the routine and let me know

Simon

List of 15 messages in thread
TopicAuthorDate
External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      
RE: External - 0 interrupt ??            01/01/70 00:00      

Back to Subject List