How do I read data from Parallel port DB25 over my Arduino? I am using this program. However, I am getting garbage values only.
Do revert as to how can I get proper values over my arduino.

/*****************************************************************************/
* PrinterCapturePoll.ino
* ------------------
* Monitor a parallel port printer output and capture each character. Output the
* character on the USB serial port so it can be captured in a terminal program.
*
* By............: Paul Jewell
* Date..........: 29th January 2015
* Version.......: 0.1a
*-------------------------------------------------------------------------- -     ----
* Wiring Layout
* ------------ -
*
* Parallel Port Output               Arduino Input
* --------------------               ------------ -
* Name      Dir.   Pin                Name    Pin
* ----             -- -                ----    -- -
* nSTROBE    &gt;       1..........................2
* DATA BYTE  &gt;     2 - 9.......................3 - 10
* nACK       &lt;      10.........................11
* BUSY       &lt;      11.........................12
* OutofPaper &lt;      12................GND
* Selected   &lt;      13.................5v
* GND        &lt;&gt;  18 - 25................GND
*------------------------------------------------------------------------------ -
******************************************************************************** /

int nStrobe = 2;
int Data0   = 3;
int Data1   = 4;
int Data2   = 5;
int Data3   = 6;
int Data4   = 7;
int Data5   = 8;
int Data6   = 9;
int Data7   = 10;
int nAck    = 11;
int Busy    = 12;
int led     = 13; // use as status led

void setup() {
  // Configure pins
  pinMode(nStrobe, INPUT_PULLUP);
  for (int n = Data0; n &lt; (Data7 + 1); n++)
    pinMode(n, INPUT_PULLUP);
  pinMode(nAck, OUTPUT);
  pinMode(Busy, OUTPUT);
  pinMode(led, OUTPUT);
  Serial.begin(9600);
  while (!Serial) {
    Serial.println("Waiting to Initialise");
  }
  //State = READY;
  delay(1000);
  Serial.println("Initialised");
  delay(1000);
}

void loop() {
  while (digitalRead(nStrobe) == HIGH) {
    digitalWrite(Busy, LOW);
    digitalWrite(nAck, HIGH);
    digitalWrite(led, HIGH);
    ProcessChar();
  }
  digitalWrite(Busy, HIGH);
  digitalWrite(led, LOW);
  digitalWrite(nAck, LOW);
  delay(5); //milliseconds. Specification minimum = 5 us
}

void ProcessChar() {
  byte Char;
  Char = digitalRead(Data0) +
         (digitalRead(Data1) &lt;&lt; 1) +
         (digitalRead(Data2) &lt;&lt; 2) +
         (digitalRead(Data3) &lt;&lt; 3) +
         (digitalRead(Data4) &lt;&lt; 4) +
         (digitalRead(Data5) &lt;&lt; 5) +
         (digitalRead(Data6) &lt;&lt; 6) +
         (digitalRead(Data7) &lt;&lt; 7);
  Serial.print(char(Char));
}
I think I can see the problem - although I have no way to test it.

According to Wikipedia:


  When the data was ready, the host pulled the STROBE pin low, to 0 V. The printer responded by pulling the BUSY line high, printing the character, and then returning BUSY to low again.


That's not what you're doing - you are repeatedly reading while the strobe is HIGH.

Here's my attempt at your loop() which I hope will at least get you started:

void loop()
{
    // Wait for strobe to go LOW, indicating a character is ready
    while (digitalRead(nStrobe) == LOW) {
        delay(1)
    };

    // Strobe is now LOW - a character is ready.
    // Pull BUSY to high
    // (NB: I don't know what you're doing with nAct and led)
    digitalWrite(Busy, HIGH);
    digitalWrite(led, LOW);
    digitalWrite(nAck,LOW);

    // Print the character
    ProcessChar();

    // Return BUSY to low again
    // (NB: I don't know what you're doing with nAct and led)
    digitalWrite(Busy, LOW);
    digitalWrite(led, HIGH);
    digitalWrite(nAck,HIGH);

    // Wait for the strobe to go HIGH again
    while (digitalRead(nStrobe) == LOW) {
        delay(1)
    };
}    


You should also probably consider setting the initial values of your outputs (BUSY and nAck) rather than relying on them defaulting to some particular state.  I don't know what (n)Ack is for in this case -- Wikipedia doesn't mention it.