Preview

Stepper Motors Essay Example

Powerful Essays
Open Document
Open Document
2598 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Stepper Motors Essay Example
1. Introduction

This is the first in a series of articles on using Forth to interact with the real world. We will explore how to control motors of various types (such as servomotors and stepper motors), switch power to devices, and sense the environment. Each article will present a project that can be used to demonstrate the ideas we are going to discuss.

In this first article, I want to lay the foundation for the future columns and discuss the use of the PC parallel port to control stepper motors. We will adopt the fantasy that we are working on some microprocessor-based control application and will be using the PC parallel port as a proxy for the digital I/O channels on our controller. To the extent possible, the code will be written in high level (so that we can illustrate the principles clearly), and will be in ANS Forth.

2. The PC Parallel Port

First, if you haven't already, go to your back issues of Forth Dimensions and find Ken Merk's article "Forth in Control," (FD XVII/2). In that article, Ken talks about using the PC parallel port for eight digital outputs. We will be expanding on that and use some of those other pins to get input as well as to provide output.

A parallel port on the PC is really three address locations which, for conventional use, could be called #Data, #Command, and #Status. The port #Data is at the base address of the parallel port, #Status is at the base address plus one, and #Command is at base plus two.

The base address depends upon which parallel port we are using and the hardware installed in your computer; usually, this address is one of the hex addresses 03BC, 0378, or 0278. The BIOS determines the address and maps it to the parallel ports at boot time. This allows an application to find out where the port is by simply reading the table in memory that starts at 0040:0008. Ken shows in his article how to get this value and set a constant containing the base address for the first port; we will do the same here.

You May Also Find These Documents Helpful

  • Satisfactory Essays

    What field in the TCP header contains a well-known port number that maps to the application that will handle the segment data…

    • 434 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Nt1310 Unit 3 Quiz

    • 1152 Words
    • 5 Pages

    End system use port numbers to select the proper application what is the lowest port number that can be dynamically assigned by the host system?…

    • 1152 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    Nt1110 Unit 3 Assignment

    • 655 Words
    • 3 Pages

    Server side code will include the portion of opening a socket on a specific port as discussed earlier and in addition to it there will be some if-else construct or a switch case implementation that will interpret the incoming instructions from the client ma-chine and will call the related method associated with the in-struction…

    • 655 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    (en.wikipedia)A port expander is computer hardware that allows more than one device to connect to a…

    • 603 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Paper II - Section : II Embedded Systems INDEX No 1 2 3 4 5 6 7 8 9 10 Toggle Port LED Simulate Binary Counter at Port Generate delay using TIMER_0 Stepper Motor (clockwise/Anticlockwise) Generating square wave at port pin Generating Triangular wave at port pin Sine wave generation using look-up table Microcontrollers communicating over a serial link Read switch-status from i/p port and display at o/p port Using Input Capture Pin (ICP), measure pulse width & display at o/p port Topic Date 6-9-2010 9-9-2010 17-9-2010 24-9-2010 8-10-2010 15-10-2010 15-10-2010 29-10-2010 22-11-2010 24-11-2010 Page 02 03 04 06 07 09 10 11 13 15 Sign…

    • 742 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Nt1330 Unit 3 Assignment 1

    • 2019 Words
    • 9 Pages

    • Your computer performs a bitwise logical AND operation between the address and…

    • 2019 Words
    • 9 Pages
    Powerful Essays
  • Satisfactory Essays

    netw 240 week 7

    • 330 Words
    • 3 Pages

    What Field in the TCP header contains a well known port number that maps to the Application that will handle the segment Data Stream?…

    • 330 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Nt1330 Unit 7

    • 465 Words
    • 2 Pages

    a) In: UDP ports 1024 through 5000 i) The Windows Media server uses UDP In ports 1024-5000 to receive data from another server. b) Out: TCP on port 80 and 554 i) The Windows Media server uses the TCP Out ports to establish an HTTP connection (port 80) or RTSP connection (port 554) to another server or encoder. c) Out: UDP on port 5005 i) When RTSPU distribution is used, the Windows Media server uses UDP Out port 5005 to send resend requests to another server.…

    • 465 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Router Simulation

    • 331 Words
    • 2 Pages

    6. What organization has been given the responsibility for assigning port numbers, sometimes referred to as “Well Known Ports or Registered Ports”? IANA…

    • 331 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    3. How does a client application identify a server application on another computer on the network? By the port number, port, or port address.…

    • 736 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Securing Windows Media

    • 481 Words
    • 2 Pages

    | The Windows Media distribution server uses a port within this UDP In port range to receive data packets from the origin server.…

    • 481 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Netstat

    • 481 Words
    • 2 Pages

    2. On a Windows computer, what command can you enter to show all open ports being used?…

    • 481 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Lab Quiz 5

    • 708 Words
    • 3 Pages

    5. When the "RAM Main" is being read from or written to, the address used will be the one held in this register…

    • 708 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    5. What information is needed to create a TCP Socket? - The Local System?s IP Address and Port Number. And the Remote System’s IPAddress and Port Number.…

    • 34626 Words
    • 139 Pages
    Powerful Essays
  • Satisfactory Essays

    Parallel port: This interface is found on the back of older PCs and is used for…

    • 636 Words
    • 3 Pages
    Satisfactory Essays