1. Computer Interfacing - DC Motor Control Lab

1. Computer Interfacing - DC Motor Control Lab - 1Computer...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Computer Engineering Name: _____________________________ Lab – DC Motor Control Purpose: To control a small DC motor from a computer Background: Controlling a DC motor with a computer is much like controlling a LED. The commands for the motor are the same as the commands for the LEDs. The information comes from the first data pin, D0, and the motor must use power from an external power supply. The direction a DC motor turns depends on the direction of current flow through the motor. Reversing the 9 volt battery terminals reverses the motor. Schematic Diagram: r r r r o o r Method: 1. Connect the circuit as shown and test the connections using the program: parallelput (1) delay (2000) parallelput (0)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2. This program turns the motor on and off. var key: string(1) var answer: string % Program is repeated until the key n is pressed. loop %The motor is turned on parallelput (1) put “Press any key to turn the motor off.” %The getch input structure does not wait for the return to be pressed. getch (key)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/10/2011 for the course ICE 4M1 taught by Professor Deabr during the Spring '11 term at Spring Arbor University.

Page1 / 3

1. Computer Interfacing - DC Motor Control Lab - 1Computer...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online