News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

need help for handling IRQ7

Started by digelo, July 01, 2012, 07:12:19 PM

Previous topic - Next topic

digelo

Hi
Im working on a project for handling 50khz data transmission from an A/D interface device to a software in windows XP.
Best way for me is developing a device driver for handling my external 50khz interrupts via parallel port. its a month i started study KMDkit tutorial, Some windows NT architecture , Interrupt handling ,Parallel port interrupt , ...
now i really need shortcut like some examples to stick it together.

qWord

Does the parallel port allow bidirectional communication?
MREAL macros - when you need floating point arithmetic while assembling!

dedndave

yes - it is a fairly simple interface to use, too (if it weren't for protected mode   :biggrin: )
i did some stuff in the DOS days - but nothing recent

farrier

digelo,

If you value your time, take a look at a ready to go product from:

http://www.mccdaq.com/solutions/USB-Multifunction-DAQ.aspx

I have had nothing but good luck with these for one off process control applications.  Good hardware and software which allows sampling control and process decisions.

hth,

farrier
For the code is dark, and full of errors!
It's a good day to code!
Don't Bogart that code, my friend!

digelo

I think i should find IDT area in memory and then set an IDT entry for irq7 that seems easy but
Me and my computer cant understand each other yet :(

BogdanOntanu

Quote from: digelo on July 02, 2012, 08:00:57 PM
I think i should find IDT area in memory and then set an IDT entry for irq7 that seems easy but
Me and my computer cant understand each other yet :(

No, you can not do that. Windows 7 will not allow it. Besides your will interfere with OS function and most liker your program will generate random crashes.

You must study and use the proper kernel mode driver interfaces.

Anyway in win7 your drivers must be signed by Microsoft or otherwise the drive will NOT be loaded by the OS and there is no way to bypass this.
I seriously doubt that Microsoft will sign a a driver written in ASM that is overwriting the IDT bluntly.

Alternative all antivirus programs should flag such an application as an potential threat.
Ambition is a lame excuse for the ones not brave enough to be lazy, www.oby.ro

digelo

Quote from: farrier on July 02, 2012, 07:49:38 PM
digelo,

If you value your time, take a look at a ready to go product from:

http://www.mccdaq.com/solutions/USB-Multifunction-DAQ.aspx

I have had nothing but good luck with these for one off process control applications.  Good hardware and software which allows sampling control and process decisions.

hth,

farrier
After this parallel project i should design a interface that is similar to those usb data acquisition modules but via PCI port.

digelo

Quote from: BogdanOntanu on July 02, 2012, 08:13:29 PM
Quote from: digelo on July 02, 2012, 08:00:57 PM
I think i should find IDT area in memory and then set an IDT entry for irq7 that seems easy but
Me and my computer cant understand each other yet :(

No, you can not do that. Windows 7 will not allow it. Besides your will interfere with OS function and most liker your program will generate random crashes.

You must study and use the proper kernel mode driver interfaces.

Anyway in win7 your drivers must be signed by Microsoft or otherwise the drive will NOT be loaded by the OS and there is no way to bypass this.
I seriously doubt that Microsoft will sign a a driver written in ASM that is overwriting the IDT bluntly.

Alternative all antivirus programs should flag such an application as an potential threat.
I know i cant use my driver in windows 7 cuz of that i still use windows xp for hardware projects
If my way is wrong can u put me in right direction?

dedndave

you may have some luck with IOCTL - i don't know
otherwise, you might find a 3rd party driver

digelo

Quote from: dedndave on July 02, 2012, 09:05:05 PM
you may have some luck with IOCTL - i don't know
otherwise, you might find a 3rd party driver
IOCTL is for unix based os like linux or macOS

hutch--

IOCTL is also the name of a group of functions in the Windows API, in Windows it has nothing to do with Unix based systems.

digelo

ah i never heard of it in windows :D

dedndave

well - i have looked at a few 3rd party drivers
none of them seem to handle interrupts - at least not as i know them
one of them claimed to provide "interrupt emulation" - what ever that means   :P

your data rate is at the limit of the parallel port capability, as i remember it
you probably want to use an interrupt-driven driver

MichaelW

According to Frank van Gilluwe's book The Undocumented PC, for a standard parallel port the theoretical maximum transfer rate is 500K bytes per second, and "most users can expect a best case transfer rate of about 150K bytes per second". An EPP port can boost the 150K to 2M bytes per second. That said, I doubt that a 50KHz interrupt rate would be workable if the handler had to do any significant amount of port I/O.
Well Microsoft, here's another nice mess you've gotten us into.

digelo

I need max-speed, i can deal with 30-20khz too
In Dos my father reached 180khz with parallel port for NMR interface manufactures. but thats a dream for me in Windows user-mode.
In Windows user-mode maximum speed i could communicate with my hardware was 1khz via serial port, beyond this speed can happen only in Windows kernel-mode.
In kernel-mode with a device driver that handle interrupts inside itself i can pass the limitation of windows timers and CPU priority-queue issue.

Here I am, on the road again.