# Programming Parallel Port

A

#### Animesh Maurya

Jan 1, 1970
0
Hi all,

I'm learning basics for parallel port interfacing.

http://www.geocities.com/animesh_m/led_flash.jpg

Here a program is written in C, which blinks the LED at Data 0 (Pin2),
when Busy (Pin11) goes to logic zero.

Port address is alright, but unfortunately when I switched on the
supply LED started glowing irrespective to the logic level at pin11
(Busy).

Thanks

T

#### the Wiz

Jan 1, 1970
0
Hi all,

I'm learning basics for parallel port interfacing.

http://www.geocities.com/animesh_m/led_flash.jpg

Here a program is written in C, which blinks the LED at Data 0 (Pin2),
when Busy (Pin11) goes to logic zero.

Port address is alright, but unfortunately when I switched on the
supply LED started glowing irrespective to the logic level at pin11
(Busy).

Thanks

Are you sure that you're looking at pin 2?

The count is different depending on whether you're looking at the front or back
side of the connector.

Who, me? I would never make that mistake ;-)

VB3/VB6/C/PowerBasic source code: http://www.jecarter.com/programs.html
Freeware for the Palm with NS Basic source code: http://nsb.jecarter.com
Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
Email here: http://www.jecarter.com/contactme.htm

A

#### Animesh Maurya

Jan 1, 1970
0
the Wiz said:
[email protected] (Animesh Maurya) wrote:
Are you sure that you're looking at pin 2?

I am sure that all connections are up to the mark.

Now I am sure that WinXp do not support parallel port programming under dos mode.
Program is tested to run under Win9x platform, and now winxp is making me ill..

Did anybody notice it? Waiting for a response………..

Thanks

R

#### Rich Grise

Jan 1, 1970
0
Hi all,

I'm learning basics for parallel port interfacing.

http://www.geocities.com/animesh_m/led_flash.jpg

Here a program is written in C, which blinks the LED at Data 0 (Pin2),
when Busy (Pin11) goes to logic zero.

Port address is alright, but unfortunately when I switched on the
supply LED started glowing irrespective to the logic level at pin11
(Busy).

It might seem obvious, but your schematic doesn't show anything
in common between your external supply and the PC other than
the LED and resistor. Have you connected their grounds together?

K

#### KevinR

Jan 1, 1970
0
I am sure that all connections are up to the mark.

Now I am sure that WinXp do not support parallel port programming under dos mode.
Program is tested to run under Win9x platform, and now winxp is making me ill..

Did anybody notice it? Waiting for a response………..

Thanks

Win XP and win2K are likely to cause problems with this, as they will
not release hardware to programs not running in ring 0.
You might find this easier if you can use visual basic or visual C++
and use the inpout32.dll file available from
http://www.logix4u.cjb.net/

S

#### Si Ballenger

Jan 1, 1970
0
I am sure that all connections are up to the mark.

Now I am sure that WinXp do not support parallel port programming under dos mode.
Program is tested to run under Win9x platform, and now winxp is making me ill..

Did anybody notice it? Waiting for a response………..

You can run a program called userport on your NT/2K/XP machine to
get user level access to the parallel port pins. Below are a
couple of pages where I've done some simple parallel port stuff.

http://www.geocities.com/zoomkat/ppswitcher.htm
http://www.geocities.com/zoomkat/output.htm
http://www.geocities.com/zoomkat/status.htm

A

#### Animesh Maurya

Jan 1, 1970
0
It might seem obvious, but your schematic doesn't show anything
in common between your external supply and the PC other than
the LED and resistor. Have you connected their grounds together?

Hi Rich,

Yes I did connect it. Now all that i can do is to try it on win98 machine.

Thanks

A

#### Animesh Maurya

Jan 1, 1970
0
You can run a program called userport on your NT/2K/XP machine to
get user level access to the parallel port pins. Below are a
couple of pages where I've done some simple parallel port stuff.

http://www.geocities.com/zoomkat/ppswitcher.htm
http://www.geocities.com/zoomkat/output.htm
http://www.geocities.com/zoomkat/status.htm

wow you did it…., thanks a lot. It did what I expected!
http://www.embeddedtronics.com/public/Electronics/minidaq/userport/UserPort.zip
Thanks again

AM

M

#### [email protected]

Jan 1, 1970
0
Hi all,
I'm learning basics for parallel port interfacing.
http://www.geocities.com/animesh_m/led_flash.jpg
Here a program is written in C, which blinks the LED at Data 0 (Pin2),
when Busy (Pin11) goes to logic zero.
Port address is alright, but unfortunately when I switched on the
supply LED started glowing irrespective to the logic level at pin11
(Busy).
Thanks
Further to my reply under messages "PC based Measurements"
here is a sample of code to write to the P.Port using 'io.dll' and Purebasic.

1 PortNum.l = $378 ; LPT1 2 3;- (check library file open) 4 LibOpen.l = OpenLibrary(1,"io.dll") 5 If LibOpen = 0 6 End 7 EndIf 8 9 CallFunction(1,"PortOut", PortNum,$080) ; write 80h to port 378h
10 End

M

#### [email protected]

Jan 1, 1970
0
Further to my reply under messages "PC based Measurements"
here is a sample of code to write to the P.Port using 'io.dll' and Purebasic.

1 PortNum.l = $378 ; LPT1 2 3;- (check library file open) 4 LibOpen.l = OpenLibrary(1,"io.dll") 5 If LibOpen = 0 6 End 7 EndIf 8 9 CallFunction(1,"PortOut", PortNum,$080) ; write 80h to port 378h
10 End
and I forgot to sign my msg
Kevin T

K

#### krishneo

Jan 1, 1970
0
Guys Anybody having idea about interfacing serial port in winxp

B

#### Bob Masta

Jan 1, 1970
0
Guys Anybody having idea about interfacing serial port in winxp

Haven't tried it, but if you don't want to use
the Win32 API you will need to load a special
kernel driver to gain access. The first place
to check for any kind of port info is
Lakeview Research <www.lvr.com>
That should at least get you started.

Best regards,

Bob Masta

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com

Replies
5
Views
3K
Replies
3
Views
3K
S
Replies
3
Views
1K
G.Moralis
G
J
Replies
1
Views
1K
Jonathan
J
H
Replies
0
Views
4K
Henning Mortensen
H