Question

In: Electrical Engineering

design a stepper motor in 8051 microcontroller in which stepper motor moves clockwise for some time...

design a stepper motor in 8051 microcontroller in which stepper motor moves clockwise for some time and stops , then anticlockwise for some times and motor stops. (Code in assembly language needed)

Solutions

Expert Solution

CLOCK WISE DIRECTION

CODE SEQUENCE

HEX CODE

STEP INPUT

0

1

1

1

07

1

0

0

0

1

0

1

1

0B

0

1

0

0

1

1

0

1

0D

0

0

1

0

1

1

1

0

0E

0

0

0

1



MOV A,#80

MOV DPTR,#2023

MOVX @DPTR,A

MOV DPTR,#2022

REPEAT: MOV A,#07

MOVX @DPTR,A

LCALL DELAY

MOV A,#0B

MOVX @DPTR,A

LCALL DELAY

MOV A,#0D

MOVX @DPTR,A

LCALL DELAY

MOV A,#0E

MOVX @DPTR,A

LCALL DELAY

SJMP REPEAT

DELAY: MOV R0,#01

LOOP3: MOV R1,#0FF

LOOP2: MOV R2,#0FF

LOOP1: DJNZ R2,LOOP1

DJNZ R1,LOOP2

DJNZ R0,LOOP3

RET



ANTI CLOCK WISE DIRECTION

CODE SEQUENCE

HEX CODE

STEP INPUT

0

1

1

1

07

1

0

0

0

1

1

1

0

0E

0

0

0

1

1

1

0

1

0D

0

0

1

0

1

0

1

1

0B

0

1

0

0

MOV A,#80

MOV DPTR,#2023

MOVX @DPTR,A

MOV DPTR,#2022

REPEAT: MOV A,#07

MOVX @DPTR,A

LCALL DELAY

MOV A,#0E

MOVX @DPTR,A

LCALL DELAY

MOV A,#0D

MOVX @DPTR,A

LCALL DELAY

MOV A,#0B

MOVX @DPTR,A

LCALL DELAY

SJMP REPEAT

DELAY: MOV R0,#01

LOOP3: MOV R1,#0FF

LOOP2: MOV R2,#0FF

LOOP1: DJNZ R2,LOOP1

DJNZ R1,LOOP2

DJNZ R0,LOOP3

RET


Related Solutions

What is a stepper motor and give some examples of where a stepper motor may be...
What is a stepper motor and give some examples of where a stepper motor may be utilized.
The stepper motor controller will run in full step mode. That means the clockwise sequence will...
The stepper motor controller will run in full step mode. That means the clockwise sequence will be Winding1 Winding2 Winding3 Winding4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Repeat the pattern The counterclockwise sequence will be Winding1 Winding2 Winding3 Winding4 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 Repeat the pattern Design a stepper motor controller for half step mode in VHDL using...
Design a stepper motor controller for half step mode in MultiSim. The following will be your...
Design a stepper motor controller for half step mode in MultiSim. The following will be your inputs: CLOCK – A 1Hz clock signal RESET – A SPST switch configured as an input to reset the system DIRECTION – A SPST switch that determine the direction. HIGH for clockwise and LOW for counterclockwise Be sure to include each of the following: State Diagram State Assignments Next State Table Boolean equations for next state logic and output logic Build the circuit in...
Design and analyse of a circuit which turns a DC motor at a speed which is...
Design and analyse of a circuit which turns a DC motor at a speed which is proportional to how much a temperature is away from a set temperature, and turns: Clockwise when temperature is greater than (say) 25 degrees C. Anticlockwise when the temperature is less than (say) 20 degrees C. Such a circuit might be used to regulate the temperature of a room by turning a ceiling fan to move warm air in/out of that room (using the roof...
Design a Digital Voting Machine using microcontroller based device which can be performed in election electronic...
Design a Digital Voting Machine using microcontroller based device which can be performed in election electronic voting system. (You can allow five candidates and 50 users. The overall result of the election should be displayed after all.) Create an algorithm to design a solution Write a programme to implement the given specification selecting an appropriate microcontroller. (Use Assembly or C languages) Please attach schematic diagrams (Circuit diagram).
Design the format of the packet with which we want to transmit the current time with...
Design the format of the packet with which we want to transmit the current time with an accuracy of milliseconds. Are there more ways to design such a format?
Design a linear-time algorithm which, given an undirected graph G and a particular edge e in...
Design a linear-time algorithm which, given an undirected graph G and a particular edge e in it, determines whether G has a cycle containing e. Your algorithm should also return the length (number of edges) of the shortest cycle containing e, if one exists. Just give the algorithm, no proofs are necessary. Hint: you can use BFS to solve this.
Design an experiment in which you would perform some sort of hypothesis test about frequencies. For...
Design an experiment in which you would perform some sort of hypothesis test about frequencies. For your chosen experiment, explain your entire experimental design. What is your population of interest? How are you going to randomly sample the pop? How many replicates will you collect? What will be the form of the data you collect and what test will you perform? What is your null and alternative hypothesis?
Albany has recently spent some time on researching and developing a new product for which they...
Albany has recently spent some time on researching and developing a new product for which they are trying to establish a suitable price. Previously they have used cost-plus 20 per cent to set the selling price. The standard cost per unit has been estimated as follows: £ Direct materials:    Material 1 10 (4kg at £2.50/kg)    Material 2 7 (1kg at £7.00/kg Direct labour 13 (two hours at £6.50/hour) Fixed overheads 7 (two hours at £3.50/hour) 37 Required: Using...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT