Jump to content

Accessing Parallel port pins


zero-tolerance

Recommended Posts

Hi everyone. I'm involved in a project where I'm controlling a stepping motor via a Unipolar Stepper Motor Board (manual provided on the link. I only want to controll the direction and the speed of the motor and I'm using a Hall affect detector for the zero position of the motor. (i.e. i'm basically using it as a referanc position)

http://documents.rs-components.com/rs-bin/...900766b802ee6cd

Anyway, my main concern for now is to talk to the Motor controller Board through the parallel port of my PC. I am using Windows 200 Platform (I don't think it would make a differene).

I have previously used LabView when I was involved in a different project but then I used srial port as the link with the hardware I had.

What I really need is to directly controll 3 pins of the parallel port: 1 for direction, 1 for speed and 1 for zero position. Two of the pins will be connected to the motor Board and the third one to the Hall Affect detector.

So, does anyone know how to directly access th parallel port pins through LabView.

Thank you

Link to comment
So, does anyone know how to directly access th parallel port pins through LabView.

You can write to the parallel port using Out Port. Please see the examples at the locations listed below. The address of the parallel port is x378.

Parallel Port Read and Write Loop VI: labview\examples\portaccess\parallel port examples.llb

Parallel Port Additional Data Register Inputs VI: labview\examples\portaccess\parallel port examples.llb

Link to comment
You can write to the parallel port using Out Port. Please see the examples at the locations listed below. The address of the parallel port is x378.

Parallel Port Read and Write Loop VI: labview\examples\portaccess\parallel port examples.llb

Parallel Port Additional Data Register Inputs VI: labview\examples\portaccess\parallel port examples.llb

accessing parallel port I don't have a problem with, but what I need is to use 3 parallel port pins as I/O pins, i.e. I need to send a pack of 0's and 1's to one particular pin only (lets saypin 2) because I don't want to use the hanshaking signals etc on the paralel port. Also I need to recieve a signal HIGH from the Hall affect where in computer language that would be 1. Would anyone happen to have an example??

Thanks in advanced

Link to comment
accessing parallel port I don't have a problem with, but what I need is to use 3 parallel port pins as I/O pins, i.e. I need to send a pack of 0's and 1's to one particular pin only (lets saypin 2) because I don't want to use the hanshaking signals etc on the paralel port. Also I need to recieve a signal HIGH from the Hall affect where in computer language that would be 1. Would anyone happen to have an example??

Thanks in advanced

Hi zero............

here one more example - how to talk to chip via SPI ( eg. g. 16Bit)

Hope this helps to understand the sequential Operation with LPT - Port

Regards

Werner

Download File:post-4460-1161958716.zip

Link to comment
Hi zero............

here one more example - how to talk to chip via SPI ( eg. g. 16Bit)

Hope this helps to understand the sequential Operation with LPT - Port

Regards

Werner

Many thanks for your reply "wha" and "Falevoz Y.", I am still on the process of understanding the program "wha" gave me. It looks probably just what I need (even though mine is much simpler than that, since all I need is 2 output ports to talk to my motor controler board and 1 input from the "hall effect" i.e. I will only recieve a HIGH (5 V) when triggered and the rest of the time it will be LOW (0 V) and also I'm not too much worried about the timing issues).

I haven't been involved in this type of work before and even though I have done some work on LabVIew ( for about 2 months ) I am still at the beginners level. Thanks again.

Link to comment
  • 2 weeks later...

Hi again. I just tried making a simple example for talking to the parallel port pins but so far unssuccesfull.

Below is an attachment of just a simple example that I wanted to see wheather I could drive at least one of the pins High or Low.

On the attachment VI all I'm doing is sending a 85 decimal number to the input port, which means that I am senidng 10101010 to the port.

I am checking the pins using a Voltmenter. If its LOW then I should get below 2.5 V and if its HIGH then I should get anything above 2.7 (I think).

When I check the D0 to D7 Pins i.e. pins 2 to 9, I get all high (they are roughly 4.57 V).

My understanding so far is: 10101010 has 8 bits, meaning that I am sending HIGH to pin 2, LOW to pin 3, HIGH to pin 4, LOW to pin 5 etc..

is this correct??

The Parallel ports address is 378 (hex). Just to make sure I have attached the parallel ports addresses the way I see it on the system, since I'have 2 types of addresses showing on the screen.

Any help would be appriciated. Thank you again to everyone who helped me so far.

Download File:post-4068-1162825836.vi

post-4068-1162826655.jpg?width=400

post-4068-1162826671.jpg?width=400

Link to comment
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.