Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/07/01 08:22
Read: times


 
#9053 - Stepper Motor Trick
I build a machine to wire exactly some HF-Coils and i used a standard 8052 CPU.
For exactly and simple position i used a stepper motor. Now the trick is how can i simple interface it for left and right turns.The signals for the Stepper motor is S1 and S2 (90 Phase degree).
I build a 32 bit Counter for the position indicator.
The last 2 lsb of this counter is important to drive the stepper motor.

code example:
INC or DEC the Counter (32bit)
LCALL DRIVE ;on every change
.....

DRIVE: MOV A,Counter_lsb
MOV C,ACC.1 ;bit 1 = S1
MOV PORT.S1,C
DEC A ;90 degree of Phase
MOV C,ACC.1 ;bit 1 = S2
MOV PORT.S2,C
RET

It is not important to sync. S1 and S2 to the Port, only one Signal change.

It is the simplest way ?
Sascha

List of 3 messages in thread
TopicAuthorDate
Stepper Motor Trick            01/01/70 00:00      
RE: Stepper Motor Trick            01/01/70 00:00      
RE: Stepper Motor Trick            01/01/70 00:00      

Back to Subject List