hi, I'm new to the forum and I hope that i have put this in to the right section...

anyway here is my problem, i have to build an electronic device for a school project ( we have to build a device at the end of schooling to show our knowledge). I have decided to make a project that will control step motors via the computers parallel port. So in order to make it work i have decided to write a program that will send trough the parallel port signals that will be interpret via the microcontroller. here is only a part of my code that i need help with:

it must send 3 bits of information via the data pins after that the program choses what is the combination of the pins and choses via the case command the appropriate functions. so if i would write this :

void move(void)
{
   do
    {
       outportb(0x378,0x01);
       if ((inportb(0x379,0x80))==0){
       return ;}
    }
       loop
      return;
}

two questions will this work and will this keep pulsing the 1 bit on the port or will it just leave it on high value?

thanks in advance... ETS

-- P.S. Greetings from Croatia

If you make the parallel port pins high, they stay high until you make them low.

Not that simple,the motor will not understand computer signals,

This is just nonsense.

well thank you, this solves one half of my problem... the other half I can test on hardware... P.S. The motor will understand the computer signals because I'm using the computer just to start some electronics that will drive the motor...

This article has been dead for over six months. Start a new discussion instead.