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.

Parallel Port Interrupt in win2K

Status
Not open for further replies.

kasd

Member level 1
Joined
Nov 11, 2004
Messages
39
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Location
Singapore
Activity points
359
Hi,

I am trying to implement interrupt for the parallel port based on example in chapter 8 of the book "The Windows 2000 Device Driver Book". However, the example is not working.

Anyone has any examples on interrupt for parallel port? Or have tried successfully to use interrupt in parallel port or used the example successfully before? Please let me know.

Thanks a million,
kas
 

Hello Kas,

I'm trying to write a simple driver to monitor a hardware line by using the ppt nACK interrupt.
I'm basing my code on the driver in Chapter 8. I can get into the driverEntry(), and DeviceCreate()
and into the DeviceDispatchControl() (eg. ioctl). (I'm not using / commented out Read and Write).

My problem is I cannot get an interrupt / get into my ISR.

I think it is related to not being able to claim the resources. I think the system parport.sys
driver has the interrupt/ppt ports allocated so I cannot allocate them, thus I'm not getting
the interrupt. Anyone know how I can get an interrupt from the PPT. (Yes I have
a signal on the PPT pin (1/2 Hz TTL square wave).

Don
 

If you don't have a device driver ie. if you are not in kernel mode, you will never get that interrupt, since you will see only a virtual device. Use winio from this website: www.internals.com.

Regards.
 

Hello cfant,

I am in kernel mode. I make it into the kernel mode to handle win32 calls for DeviceCreate() etc
for the parallel port. The only problem is not being able to get an interrupt.

Don
 

Did you enabled the interrupt from parallel port? Is there any other driver using this parallel port?
 

ANSWER:

Hello All,

More web searches revealed the answer. (Thanks to the documentation
for the UPP driver on www.Thesycon.de.)

To get the interrupt enabled one must:
- enable the interrupt (7) for the parallel port in the BIOS.
- in the device manager settings, enable interrupts on LPT1
- in the device manager resources, select the configuration which
uses INT7.

Without all 3 of these things (and the interrupt number specified
in the BIOS matching the interrupt number in the device manager
resources) your driver will not receive an interrupt.)

[ NB. Of course the driver code must be trying to catch the
same interrupt (7). ]

Too bad this information was not included in chapter 8 of "The Windows
2000 Device Driver Book" with the sample code. (or I missed it.)

Don
 

hi

for interface with parallel port .
in debug using i/o or inportb/outportb in C.

LPT has 3 register :

data at 378h
status at 379h
control at 37Ah


BIOS MEMORY MAPPED I/O ADDRESSES :

0x408 0040:0008 LPT1 BASE ADDRESS

0x40A 0040:000A LPT2 BASE ADDRESS

0x40C 0040:000C LPT3 BASE ADDRESS

(in www.vcomsoft.com)

sorry , my english is too bad .
 

Please make sure you have enabled the interrupt in the device manager. That might be causing the problem.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top