Parallel port communication in c


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.



#define PORT 0x378

void main()




outportb(PORT, ~inportb(PORT) );






Abuzer Mughal

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

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