Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SQUARE WAVE
ADDRESS OP-CODE LABEL MNEMONICS COMMENT
6000 74 FF START mov A, #FFH ; move FFH to A
6002 F5 90 mov P1, A ; send content of A to
P1
6004 79 0F mov R1, #0FH ; Move 0FH to R1
6006 7A 0F mov R2, #0FH ; move 0FH to R2
6008 12 01 14 LCALL DELAY ; call delay subroutine
600B 12 01 14 LCALL DELAY ; call delay subroutine
600E 74 00 mov A, #00H ; move 00H to A
6010 F5 90 mov P1, A ; send content of A t P1
6012 79 1F mov R1, #1FH ; Move 1FH to R1
6014 7A 1F mov R2, #1FH ; Move 1FH to R2
6016 12 01 14 LCALL DELAY ; Call delay subroutine
6019 12 01 14 LCALL DELAY ; Call delay subroutine
601C 80 E1 SJMP START ; Jump to label START
INTERFACING STEPPER MOTOR
Stepper motor rotates in fix step of a certain number degree. Step size can be
very form 0.9 to 90 degree. Stepper motor are useful in controlled application
because the controller can determine the exact position of stepper motor shaft
without any sensor for measuring shaft position further stepper motor can be
operated as very low velocity and no gear is needed for velocity reduction. A
permanent magnet a stator is made up of electromagnets. The motor will
move to align itself to the energized electromagnet.
The field magnets are energized are after the other ground circuit, the motor
can move making either in single step mode or skew mode. Single step mode is
also called as bidirectional mode. The advantages of single step mode are that
each motor step is independent of other step and controller has completed
instantaneous control of motor.
There is other stepper motor based upon variable reluctance principle. In these
motor based upon motor is made up of toothed iron wheel and motor does
not required any excitation. There are hybrid stepper motor which combine
feature permanent magnet and variable reluctance type stepper motor.
Four phased unipolar stepper motors are the most commonly used.
ADDRESS OP-CODE LABEL MNEMONICS COMMENT
7000 12 05 59 BACK LCALL RD79 ; get number from keyboard
7003 12 01 62 LCALL ASTBIN ; get binary equivalent of
that number
7006 B4 01 05 CJNE ; if the number in
A,#01,LOOP accumulator is not equal 01
then go to label LOOP
7009 12 72 00 LCALL 7200 ; go to subroutine at
location 7200
700C 80 06 SJMP ; jump to location 7014
AGAIN
700E B4 02 EF LOOP CJNE A,02, ; if the number in
BACK accumulator is not equal to
02 then go to label BACK
7011 12 73 00 LCALL 7300 ; go to subroutine at
location 7300
7014 22 RET ; end program