| View previous topic :: View next topic |
| Author |
Message |
cak kalim
Joined: 05 May 2006 Posts: 5
|
Posted: Thu May 11, 2006 1:50 am Post subject: Basic control stepper motor with switch |
|
|
| How to make stepper motor drive forever full turn/half turn until a switch is pressed (pressed even once) ? |
|
| Back to top |
|
 |
Erick
Joined: 09 May 2006 Posts: 3
|
Posted: Thu May 11, 2006 3:04 am Post subject: Motor stepper |
|
|
You should use interrupt function INT0 or INT1 to detect whenever a swich is pushed On or OFF.
Org 0h
sjmp start
org 03h ; Interrupt vector address
sjmp InterruptMotor
;
start:
call motorstepper
sjmp start
;
InterruptMotor:
call motorOFF
;do anything
end |
|
| Back to top |
|
 |
|