Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

LPT output under windows

Status
Not open for further replies.

grv2k4

Newbie level 4
Newbie level 4
Joined
Dec 25, 2004
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
67
output data to lpt1

can anybody please explain the data patterns that is sent by the parallel port in (Turbo-C++ running under) Windows?


I created a custom LPT-connector by soldering the 16 wires(8 data bits, 8 Grounds) on to a 25 pin LPT male connector, and connected a number of LEDs on the other side of those wires. Then I created a C program to output data , using 0x3BC as the port address( i know this IS the correct port address) . However, the data displayed by the LEDs is random. If I issue 0xFF as the output, shouldn't ALL LEDs be lighted up? The result was however not that way.
I tried different combinations, (e.g. 0x00,0x04,0xf0 etc.), but the data patterns as shown by the LEDs does not seem to make any sense. Please Help!

--PeacE--
 

c++ lpt output

Did you check that your LPT port is configured in SPP mode?
 

    V

    Points: 2
    Helpful Answer Positive Rating
c++ builder+lpt

hi grv2k4
I have same problem with you unless i connect the port parelell with PPI 8255 , It's seem that computer running to fast hence my PPI 8255 could capture the data from computer.
I have configured my 8255 as SPP, would anybody help me?
 

parallel port monitor lpt1

some more information would be great.
If you use windowsXP (home or pro doesn't matter) or any other NT based windows it isn't so easy to talk to your LPT port. you will probably need a component. I don't know how it's done under turbo C++. for borland C++ builder or Visual C++ I can give u some help. I made some simple programs myself for builder, if u r interested I can always mail them.
I am not sure but I think there are some header files with different instructions available for turbo C++ (readbyte/writebyte if I remember correctly) which can talk to the LPT port if you work under a NT based windows though don't shoot me if I'm wrong.
 

Search the forum for Parallel port programming! You can directly read or write data to/from LPT. Also go to microsoft.com, and search for it. You may find a sample program which tell you how to use MFC functions on LPT.
 

i've experienced old fashionned languages under new windoze OS and result is sometimes surprising when triying to access normally forbidden hardware 8)
for example old 16 bits quickbasic can access LPT with OUT function under Windoze NT (usually NT gives a marvellous privileged instruction wraning and refuses to access to LPT) !!!
 

Better get any parallel port monitor and try to set data bits one by one.
 

I wonder why microsoft made it so extremely difficult to control such simple device as LPT port ! To control it in a "legal way" under windows (from Delphi, C-Builder, Visual C etc.) one needs to find special drivers even if it's only setting single D0..D7 pins to desired state.
 

Well, I used this dll. But as all the interfaces in PC (LPT, RS232) will dissapear in the nearest future I use USB port.
 

kekon said:
I wonder why microsoft made it so extremely difficult to control such simple device as LPT port ! To control it in a "legal way" under windows (from Delphi, C-Builder, Visual C etc.) one needs to find special drivers even if it's only setting single D0..D7 pins to desired state.

I would say mainly because MS does not want people to directly access HW. Their dream is to create a PC like Machintosh was in the early 80s, impossible to interface and a dummy unit for 99% of the users, they don't care about the geeky 1% who wants to access HW!

BR,
/Farhad
 

you can use this drive free,there are some examples included.
Thanks to Yarin Kaplan for his free driver.
 

You can use a samples when you (from jungo driver) install windriver.
There are 2 examples.
The first is without interrupt the second with interrupt.
Hi
 

for driver and dll source code for windos XP, windows 2000, win 98 please **broken link removed**

or read this topic
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top