Presentation is loading. Please wait.

Presentation is loading. Please wait.

Source: http://www.edsim51.com/8051Notes/interfacing.html#motors Motor Source: http://www.edsim51.com/8051Notes/interfacing.html#motors.

Similar presentations


Presentation on theme: "Source: http://www.edsim51.com/8051Notes/interfacing.html#motors Motor Source: http://www.edsim51.com/8051Notes/interfacing.html#motors."— Presentation transcript:

1 Source: http://www.edsim51.com/8051Notes/interfacing.html#motors
Motor Source:

2 Aliasing What causes aliasing? Ans:
Source:

3 Wagon wheel effect

4 An interfacing method for turning on and off a DC motor via a microcontroller is shown below.
However, the above circuit will only work for a 5 V motor. If the supply voltage is changed (for example, if the supply is changed to 12 V to run a 12 V motor) then the motor will be on all the time because 5 V applied to the base of the p-n-p transistor is not enough to turn it off.

5 To interface to larger motors the following circuit may be used.

6 Bi-directional DC Motor
P3.1 P3.0 A (P3.1) B (P3.0) Motor off 1 (5 V) On, reverse On, forward This configuration allows the controller to not only turn on and off the motor but also to set the rotating direction.

7 To select a 7-segment display
From switch 0

8 setDirection: PUSH ACC. ; save value of A on stack PUSH 20H
setDirection: PUSH ACC ; save value of A on stack PUSH 20H ; save value of location 20H (first bit-addressable ; location in RAM) on stack CLR A ; clear A MOV 20H, #0 ; clear location 20H MOV C, P2.0 ; put SW0 value in carry MOV ACC.0, C ; then move to ACC.0 MOV C, F0 ; move current motor direction in carry MOV 0, C ; and move to LSB of location 20H (which has bit address 0) CJNE A, 20H, changeDir ; | compare SW0 (LSB of A) with F0 (LSB of 20H) ; | - if they are not the same, the motor's direction needs to be reversed JMP finish ; if they are the same, motor's direction does not need to be changed

9


Download ppt "Source: http://www.edsim51.com/8051Notes/interfacing.html#motors Motor Source: http://www.edsim51.com/8051Notes/interfacing.html#motors."

Similar presentations


Ads by Google