Parallel port communication in c

Hello!

Parallel port communication in c.

i am using turbo c++ compiler. and try to blink a led connected on LPT1 port. but this is not working.

I need some help related to parrallel port communication in c++.

LED is connected at 2 and ground pin of LPT1.

#include"conio.h"

#include"dos.h"

#define PORT 0x378

void main()

{

while(!kbhit())

{

outportb(PORT, ~inportb(PORT) );

delay(1000);

}

}

--

Regards:

Abuzer Mughal

you need to provide more details of this error and your OS.

As you are using the code from http://electrosofts.com/parallel/ , it should work. Make sure you are connecting correct +/- LED connections or try to use it with a resistor as mentioned in that page.