Hack Your Parallel Port

Parallel Port Description

For blinking LED you have to write a code. i.e. first you have to make the data pin high(pin no:2-9)
we will be writing a C code:

1. #include”stdio.h”
2. #include”sys/io.h” /*Header file for iopl(),outb()*/
3. main()
4. {
5. iopl(3);/*to give your program access to all I/O ports*/
6. while(1)
7. {
8. outb(0xff,0x378); /* it will make the pin 2-9 high(0xff eight 1’s) & 0x378 is the port address*/
9. sleep(1);
10. outb(0x00,0x378);/*it will make the pin 2-9 low */
11. sleep(1);
12. }
13. }

Now comes your circuit. Here we have connected only 1 LED to pin2 and pin 19 is the ground.
You can connect LED to pin 2-9 with a resistor(1k) & control these pins in different way

comments to:
Ranjeeth PT
Govt Engg College


2 Responses to Hack Your Parallel Port

  1. Manny says:

    can you give the source code in c++ should be almost the same?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: