Saturday, April 30, 2016

8051 Program – frequency measurement

; frequency measurementt
; frequency on P3.4
ORG 0H
MAIN:MOV TMOD,#05H ; TIMER -0,MODE-1, COUNTER
MOV TL0, #00H
MOV TH0, #00H
SETB TR0
ACALL DLY
CLR TR0
MOV P2,TL0
MOV P0,TH0
AJMP MAIN
DLY:
MOV R3, #08H
L3:MOV R4, #00H
L2:MOV R5, #00H
L1:DJNZ R5, L1
DJNZ R4, L2
DJNZ R3, L3
RET
END



Related topics:
8051 Program - 8bit random number generator   |   8051 Program - 16bit random number generator   |   8051 Program - bit shifting   |   8051 Program - count external interrupt   |   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