DC Motor Speed Control 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 controlling speed of DC motor with 8051 in assembly language using proteus and uvision,

Flowchart:-



Proteus Stimulation:-



Program:-

ORG 00H
CLR A
Mov P1,A
Mov P3,A
REPEAT: MOV P2,#0FFH
MOV TMOD,#02H
JNB P3.0,FORWARD
SETB P1.0
CLR P1.1
SJMP PWM1
FORWARD: CLR P1.0
SETB P1.1
PWMI: SETB P1.2
MOV R3,P2
CJNE R3,#00H NOSTOP
SJMP STOP
NOSTOP:ACALL DELAY
DJNZ R3, NOSTOP
STOP : CLR P1.2
MOV R3,P2
MOV A,#0FFH
SUBB A,R3
XCH A, R3
CJNE R3, #00H, NOSTOP2
SJMP REPEAT
NOSTOP2 : ACALL DELAY
DJNZ R3,NOSTOP2
SJMP REPEAT
DELAY:  MOV TH0,#0FFH
MOV TL0, #00H
SETB TR0
HERE:JNB TF0, HERE
CLR TF0
CLR TR0
RET
END


For more ASM programs - click here

Popular posts from this blog

Mini Militia Chat Codes - Shortforms

8051 Assembly Program Code for Sorting in Ascending Order - Keil -AT89C51