Programming Parallel Port

A

Animesh Maurya

Guest
Hi all,

I'm learning basics for parallel port interfacing.

Please see this link (program and schematic on the same page)
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).

Please help me to figure out the fault.

Thanks
 
animesh_m@eudoramail.com (Animesh Maurya) wrote:

Hi all,

I'm learning basics for parallel port interfacing.

Please see this link (program and schematic on the same page)
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).

Please help me to figure out the fault.

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 ;-)

More about me: http://www.jecarter.com/
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
 
the Wiz <look@message.body> wrote in message news:<fv86f01ej8s757n77r7lfg4f9vba3rhfaj@4ax.com>...
animesh_m@eudoramail.com (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
 
on Monday 12 July 2004 08:36 am, Animesh Maurya wrote:

Hi all,

I'm learning basics for parallel port interfacing.

Please see this link (program and schematic on the same page)
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?

--
Cheers!
Rich
 
On 13 Jul 2004 02:25:45 -0700, animesh_m@eudoramail.com (Animesh
Maurya) wrote:

the Wiz <look@message.body> wrote in message news:<fv86f01ej8s757n77r7lfg4f9vba3rhfaj@4ax.com>...
animesh_m@eudoramail.com (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
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/
 
On 13 Jul 2004 02:25:45 -0700, animesh_m@eudoramail.com (Animesh
Maurya) wrote:

the Wiz <look@message.body> wrote in message news:<fv86f01ej8s757n77r7lfg4f9vba3rhfaj@4ax.com>...
animesh_m@eudoramail.com (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………..
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
 
Rich Grise <null@example.net> wrote in message news:<1851583.1p8lkntgBn@entheos.thunderbird.ops.dsl-verizon.net>...
on Monday 12 July 2004 08:36 am, Animesh Maurya wrote:

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
 
shb*NO*SPAM*@comporium.net (Si Ballenger) wrote in message news:<40f4689e.953469086@news.comporium.net>...
On 13 Jul 2004 02:25:45 -0700, animesh_m@eudoramail.com (Animesh
Maurya) wrote:

the Wiz <look@message.body> wrote in message news:<fv86f01ej8s757n77r7lfg4f9vba3rhfaj@4ax.com>...
animesh_m@eudoramail.com (Animesh Maurya) wrote:

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!
Anyone interested can download it from
http://www.embeddedtronics.com/public/Electronics/minidaq/userport/UserPort.zip
Thanks again

AM
 
On 12 Jul 2004 08:36:42 -0700, animesh_m@eudoramail.com (Animesh Maurya) wrote:

Hi all,
I'm learning basics for parallel port interfacing.
Please see this link (program and schematic on the same page)
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).
Please help me to figure out the fault.
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
 
On Sat, 17 Jul 2004 21:41:47 +1200, mankind@work.com wrote:

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
 

Welcome to EDABoard.com

Sponsor

Back
Top