Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to control the dc server motor with 8051?

Status
Not open for further replies.

huiyen

Newbie level 4
Joined
Jan 9, 2008
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Malaysia
Activity points
1,361
I had write the program for the dc servo motor. The program such as below.As a result the servo motor's shaft was rotate continuously. I want to ask if i want to stop the motor when the motor's shaft has move 90 angle degree. How can i control it by 8051?


CPU "8051.TBL"
INCL "8051.INC"
ORG 0000H

MOV TMOD,#00000001B

LOOP: SETB P1.0
CALL DELAY
CLR P1.0
CALL DELAY
JMP LOOP

DELAY: MOV TH0,#0FEH
MOV TL0,#31H
SETB TR0
JNB TF0,$
CLR TR0
CLR TF0
RET
 

what kind of feedback do you have from the motor?
 

@huiyen... u hv giving same delay to both ON n OFF times that means it hs 50% duty cycle... that delay is for ON time ... write seperat delay of 19ms sec for OFF time...
this will work with u!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top