Saturday, April 30, 2016

8051 Program – count external interrupt

; count external interrupt
; count number of interrupts arriving on
; external interrupt pin INT1.
; Stop when counter overflows and disable the interrupt.
; Give the indication on pinP0.0
ORG 0H
MOV R2, #00H
MOV IE, #84H
HERE:SJMP HERE

ORG 0013H
INC R2
CJNE R2, #00H, OUT
MOV IE, #00H
CLR P0.0
OUT: RETI
END



Related topics:
8051 Program - 8bit random number generator   |   8051 Program - 16bit random number generator   |   8051 Program - bit shifting   |   8051 Program - frequency measurement   |   8051 Program - led rotation pattern   |   8051 Program - memory subroutines   |   8051 Program - math subroutines   |   8051 Program - conversion subroutines

List of topics: 8051

No comments:

Post a Comment