Frequency Measurement using 8051 - Assembly Program Code - Proteus Stimulation - Keil
The program is stimulated in proteus, compiled in Keil for 8051 - AT89C51 in assembly language.
Program for measuring frequency of a signal with 8051 in assembly language using proteus and uvision,
Flowchart:-
Proteus Stimulation:-
Program:-
ORG 0000H
SJMP MAIN
ORG 001BH
ACALL DISPLAY
ACALL START
RETI
MAIN :MOV TMOD,#15H
SETB EA
SETB ET1
MOV R0,#100
ACALL START
SJMP $
START :CLR TF1
CLR TF0
MOV TH1,#0DBH
MOV TL1.#0FFH
SETB TR0
SETB TR1
RET
DISPLAY : DJNZ R0,NEXT
MOV R0,#100
CLR TR0
CLR TR1
MOV A, TL0
MOV B,#0AH
DIV AB
MOV P1,B
MOV B,#0AH
DIV AB
MOV P2,B
MOV P0,A
MOV TL0,#00
MOV TH0,#00
NEXT : RET
END
For more ASM programs - click here