Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parallel port programming

Status
Not open for further replies.

Wbt

Programmer
May 11, 2000
1
SG
Hi, can anyone help or give tips on how to control a stepper motor thru the standard parallel port? Which chip must i use? I know roughly the function to use in C, outportb(int portid, unsigned char value) &lt;- here the value is in bytes? so when I write it down it will be something like outportb(0x378,0x01) for pin no. 2 of the parallel port? thanks! or mail me at <A HREF="mailto:wombat6@yahoo.com">wombat6@yahoo.com</A><br>thanks<br><br>PS its for a robotics project
 
There is quite a bit of info on the Web about the parallel port and what pin is what byte. Since some parallel ports are different than others, I would suggest you attach some LEDs to the output pins and toggle the bits with a small program to get a better feel for what it is capable of. The robot I made (A few years ago now) used a 68HC11 microcontroller interfaced to the serial port on the PC. The HC11, did all of the basic timing stuff like running the stepper motors for locomotion, the sonar, sleep functions, etc while the PC was basically used for storing mapped areas (Giving me a very SLOW graphic update of what the robot SAW), sending commands to the robot and for uploading new software to the HC11. I used a HA13421 for the stepper motor driver chip (you would put this chip between the parallel port and the motor) mainly because that is what was in my junk box at the time. The TD62004 is another chip I had, but the HA13421 suited my needs better as it has a low power standby function and drives a 4 wire type stepper. Take an old 5 1\4 floppy drive apart and you'll have all you need. 3 1/2 drives are useless for this. Basically, to drive a stepper motor all you have to do is pulse the two coils 90 deg or 270 deg out of phase to rotate the shaft in one direction or the other. <p> <br><a href=mailto:Kim_Christensen@telus.net>Kim_Christensen@telus.net</a><br><a href= Page</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top