Arduino Mega2560 controlling a SMC800 stepper motor driver-interface

Hello everyone,
The other day i discovered that there is something called a vertical plotter and now i really want to build one. This is what I´ve got so far .
Arduino Mega2560 (borrowed from a friend who does not use it)
2 Nema17 stepper mottors (recycled fron old floppy drives)
an old Emis SMC800 driver-interface board
power supply from old laptop
other bits and pieces
The problem i encountered is with the SMC800 card . This card is a 3 axis stepper driver and parallel port interface . The bad news is that it does not use the nowadays standard of pulse and direction to comunicate with the pc but some older, and for me dificult to understand, way. The good news is that the manufacturer gives everyone who buys this card some driver software written in C which they can incorporate into their own software plus a manual which explains how the thing works.
Now i know that for 20 euros i can go and buy some nice little drivers and not bother to spend time with old boards ,but i like to recycle stuff i already have, rather then buy new stuff which in no time becomes more old stuff.
What i ask of you is to take a look at the code and tell me if and how hard it would be to transform it so that i can control the board with the arduino. I dont know anything about programming , i know a little about electronics i will try and find a solution on my own ,already started reading C for dummies ,but any help is much apreciated.
Link to the manual :

I will add the code in the next post

/****************************************************************************/
/*								            */
/*  Funktion:  Beispiel zur Ansteuerung der Schrittmotorsteuerkarte SMC800  */
/*									    */
/****************************************************************************/


#include "smcmot.c"


void Plotter();
void XYZ_System();


/*****  Hauptprogramm  *****/

void main()
{

  _LPT = 0x378;			       /* Adresse der parallelen Schnittstelle   */
                                       /* muá bei Programmstart definiert werden */
				       /* LPT1: 0x378         */
                                       /* LPT2: 0x278 	      */
				       /* MDA - Karte:  0x3BC */


  /*******************************************************************/
  /*                                                                 */
  /*   Mit diesen Werten wird die Geschwindigkeit in Schritte/sec.   */
  /*   angegeben  ( Ausgabefrequenz zur Ansteuerung der Motoren )    */
  /*                                                                 */
  /*******************************************************************/

  V_Startfreq    = 200;         /* Startfrequenz Vektorausgabe       */
  V_Arbeitsfreq  = 1000;        /* Arbeitsfrequenz Vektorausgabe     */
  R_Arbeitsfreq  = 2000;        /* Arbeitsfrequenz Referenzfahrt     */
  Beschleunigung = 300;         /* Beschleunigung Vektorausgabe      */
  Bremsen        = 500;         /* Bremsen Vektorausgabe             */
                                /* die Werte fr Beschleunigung und  */
                                /* Bremsen gelten nur fr die Vektor-*/
                                /* ausgabe, bei der Referenzfahrt    */
                                /* und Tastatursteuerung werden      */
                                /* diese Werte nicht bercksichtigt  */

  /*******************************************************************/




  Init_Timer();                 /* Interrupt-Timer initialisieren   */
				/* muá bei Programmstart gemacht    */
				/* werden, damit Beschleunigung und */
				/* Bremsen berechnet werden k”nnen  */




  /* An dieser Stelle k”nnen Sie festlegen ob ein Plotter            */
  /* oder ein 3-Achsen-System demonstriert werden soll !             */
  /*                                                                 */
  /* Geben Sie folgende Syntax ein:                                  */
  /*                                                                 */
  /*           < Plotter() >     fr Plotter - Demo                  */
  /*           < XYZ_System() >  fr 3-Achsen-System - Demo          */
  /*                                                                 */
  /*                                                                 */
  /* Die Syntax zur Vektorausgabe finden Sie in der jeweil. Funktion */
  /*                                                                 */
  /* Wollen Sie also die Funktion eines Plotters demonstriert haben, */
  /* geben Sie folgende Syntax ein:		                     */



  Plotter();





  /* Dieser Aufruf ist bei einem 3-Achsen-System durch < XYZ_System() > zu ersetzen */



  /* XYZ_System(); */
}


void Plotter()
{
  int xStep, yStep, zStep;
  unsigned char F_Mode;



  printf("SMC800 / SMC1500   -   Plotter-Demo\n");
  printf("-----------------------------------\n");
  printf("Tastatur: Steuerung mit Pfeiltasten\n");
  printf("          Beenden mit <ESC>\n");



  F_Mode = 1;			        /* F_Mode = 0:  3-Achsen-System */
				        /* F_Mode = 1:  Plotter         */
  Tastatur(F_Mode);		        /* Manuelle Positionierung mit PC-Tastatur */
				        /* Abruch mit ESC                          */


  printf("Referenzfahrt:  Schalter drcken\n");



  /* Verschiedene M”glichkeiten der Initialisierung beim Aufruf zur Referenzfahrt */

  xStep = 250;				/* Schritte, die der X-Motor bei der Referenzfahrt */
					/* aus dem Schalter fahren soll			   */
  yStep = 250;				/* Schritte, die der Y-Motor bei der Referenzfahrt */
					/* aus dem Schalter fahren soll 		   */
  zStep = -32000;			/* -32000: Plotter-Modus, bei Referenzfahrt Pen up   */
					/*  32000: Plotter-Modus, bei Referenzfahrt Pen down */
  Referenz(xStep, yStep, zStep);	/* Referenzfahrt mit šbergabe der Schritte */


  xStep = 500;				/* Schritte, die der X-Motor bei der Referenzfahrt */
					/* aus dem Schalter fahren soll			   */
  yStep = 0;				/* Keine Referenzfahrt in Y-Richtung */

  zStep = -32000;			/* -32000: Pen up   */
					/*  32000: Pen down */
  Referenz(xStep, yStep, zStep);	/* Referenzfahrt mit šbergabe der Schritte */



  printf("Vektorausgabe:  Abbruch mit <ESC>\n");



  /* Positionierbeispiel */

  xStep = 8200;                         /* X - Positionierung    */
  yStep = 3400;                         /* Y - Positionierung    */
  zStep = -32000;                       /* bei angehobenen Stift */

  Vecout(xStep, yStep, zStep);          /* Ausgabe der Vektoren  */


  xStep = 5000;                         /* X - Positionierung    */
  yStep = -800;                         /* Y - Positionierung    */
  zStep = 32000;                        /* bei abgesenktem Stift */

  Vecout(xStep, yStep, zStep);          /* Ausgabe der Vektoren  */

  return;
}


void XYZ_System()
{
  int xStep, yStep, zStep;
  unsigned char F_Mode;



  printf("SMC800 / SMC1500   -   3-Achsen-Demo\n");
  printf("------------------------------------\n");
  printf("Tastatur:  Steuerung mit Pfeiltasten\n");
  printf("           Beenden mit <ESC>\n");



  F_Mode = 0;				/* F_Mode = 0:   3-Achsen-System */
					/* F_Mode = 1:   Plotter	 */
  Tastatur(F_Mode);			/* Manuelle Positionierung mit PC-Tastatur */
					/* Abbruch mit ESC                         */


  printf("Referenzfahrt:  Schalter drcken\n");



  /* Beispiel der Initialisierung beim Aufruf zur Referenzfahrt */

  xStep = 250;				/* Schritte, die der X-Motor bei der Referenzfahrt */
					/* aus dem Schalter fahren soll			   */
  yStep = 250;				/* Schritte, die der Y-Motor bei der Referenzfahrt */
					/* aus dem Schalter fahren soll 		   */
  zStep = 100;    			/* Schritte, die der Z-Motor bei der Referenzfahrt */
					/* aus dem Schalter fahren soll                    */
  Referenz(xStep, yStep, zStep);	/* Referenzfahrt mit šbergabe der Schritte */



  printf("Vektorausgabe:  Abbruch mit <ESC>\n");



  /* Positionierbeispiel */

  xStep = 4600;                         /* X - Positionierung   */
  yStep = 2300;                         /* Y - Positionierung   */
  zStep = 0;                            /* Z - Achse steht      */

  Vecout(xStep, yStep, zStep);          /* Ausgabe der Vektoren */


  xStep = 0;                            /* X - Achse steht      */
  yStep = 0;                            /* Y - Achse steht      */
  zStep = 800;                          /* Z - Achse nach unten (z.B. Bohrer) */

  Vecout(xStep, yStep, zStep);          /* Ausgabe der Vektoren */

  return;
}

There are 2 provided files. The first one i posted the code in the previous post ,the second one is to big so i´m attaching it .

cheers.

SMCMOT.C (20.4 KB)

Have you got this going?

i'm doing the same here but have Z motor moving with the following bad code in blinky

void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); pinMode(1, OUTPUT); pinMode(0, OUTPUT);

pinMode(45, OUTPUT); //#define data 1 pinMode(44, OUTPUT); //#define data 2 pinMode(47, OUTPUT); //#define data 3 pinMode(46, OUTPUT); //#define data 4 pinMode(49, OUTPUT); //#define data 5 pinMode(48, OUTPUT); //#define data 6 pinMode(51, OUTPUT); //#define data 7 pinMode(50, OUTPUT); //#define data 8 pinMode(53, OUTPUT); //#define strobe_l

digitalWrite(45, HIGH); //#define data 1 digitalWrite(44, HIGH); //#define data 2 digitalWrite(47, HIGH); //#define data 3 digitalWrite(46, HIGH); //#define data 4 digitalWrite(49, HIGH); //#define data 5 digitalWrite(48, HIGH); //#define data 6 digitalWrite(51, HIGH); //#define data 7 digitalWrite(50, HIGH); //#define data 8 digitalWrite(53, HIGH); //#define strobe_l digitalWrite(13, HIGH); digitalWrite(53, LOW); digitalWrite(53, HIGH); }

void loop() {

// step 1 delay(10); // wait for a second digitalWrite(45, LOW); //#define data 1 Max Current digitalWrite(44, LOW); //#define data 2 digitalWrite(47, HIGH); //#define data 3 A High digitalWrite(46, LOW); //#define data 4 Max Current digitalWrite(49, LOW); //#define data 5 digitalWrite(48, HIGH); //#define data 6 B High digitalWrite(51, LOW); //#define data 7 motor Z digitalWrite(50, HIGH); //#define data 8

digitalWrite(53, LOW);

digitalWrite(53, HIGH);

// step 2 delay(10); // wait for a second digitalWrite(45, LOW); //#define data 1 Max Current digitalWrite(44, LOW); //#define data 2 digitalWrite(47, HIGH); //#define data 3 A High digitalWrite(46, LOW); //#define data 4 Max Current digitalWrite(49, LOW); //#define data 5 digitalWrite(48, LOW); //#define data 6 B LOW digitalWrite(51, LOW); //#define data 7 motor Z digitalWrite(50, HIGH); //#define data 8

digitalWrite(53, LOW);

digitalWrite(53, HIGH);

// step 3 delay(10); // wait for a second digitalWrite(45, LOW); //#define data 1 Max Current digitalWrite(44, LOW); //#define data 2 digitalWrite(47, LOW); //#define data 3 A LOW digitalWrite(46, LOW); //#define data 4 Max Current digitalWrite(49, LOW); //#define data 5 digitalWrite(48, LOW); //#define data 6 B LOW digitalWrite(51, LOW); //#define data 7 motor Z digitalWrite(50, HIGH); //#define data 8

digitalWrite(53, LOW);

digitalWrite(53, HIGH);

// step 4 delay(10); // wait for a second digitalWrite(45, LOW); //#define data 1 Max Current digitalWrite(44, LOW); //#define data 2 digitalWrite(47, LOW); //#define data 3 A LOW digitalWrite(46, LOW); //#define data 4 Max Current digitalWrite(49, LOW); //#define data 5 digitalWrite(48, HIGH); //#define data 6 B HIGH digitalWrite(51, LOW); //#define data 7 motor Z digitalWrite(50, HIGH); //#define data 8

digitalWrite(53, LOW);

digitalWrite(53, HIGH); }

you have to write each phase change to the motor phase A and phase B looking into adding this into Sprinter.pde unless someone has done this and then please let me know where to look