Author Topic: need help for handling IRQ7  (Read 18498 times)

digelo

  • Regular Member
  • *
  • Posts: 24
  • I HATE C!!!
need help for handling IRQ7
« on: July 01, 2012, 07:12:19 PM »
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.
« Last Edit: July 02, 2012, 07:36:42 PM by digelo »

qWord

  • Member
  • *****
  • Posts: 1475
  • The base type of a type is the type itself
    • SmplMath macros
Re: Interrupt handeling
« Reply #1 on: July 01, 2012, 08:02:25 PM »
Does the parallel port allow bidirectional communication?
MREAL macros - when you need floating point arithmetic while assembling!

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: Interrupt handeling
« Reply #2 on: July 01, 2012, 08:44:52 PM »
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

  • Member
  • **
  • Posts: 58
Re: need help for handling IRQ7
« Reply #3 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
For the code is dark, and full of errors!
It's a good day to code!
Don't Bogart that code, my friend!

digelo

  • Regular Member
  • *
  • Posts: 24
  • I HATE C!!!
Re: need help for handling IRQ7
« Reply #4 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 :(

BogdanOntanu

  • Global Moderator
  • Member
  • *****
  • Posts: 64
    • Solar_OS, Solar_Asm and HE RTS Game
Re: need help for handling IRQ7
« Reply #5 on: July 02, 2012, 08:13:29 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

  • Regular Member
  • *
  • Posts: 24
  • I HATE C!!!
Re: need help for handling IRQ7
« Reply #6 on: July 02, 2012, 08:17:55 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

  • Regular Member
  • *
  • Posts: 24
  • I HATE C!!!
Re: need help for handling IRQ7
« Reply #7 on: July 02, 2012, 08:29:35 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

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: need help for handling IRQ7
« Reply #8 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

digelo

  • Regular Member
  • *
  • Posts: 24
  • I HATE C!!!
Re: need help for handling IRQ7
« Reply #9 on: July 02, 2012, 09:55:54 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--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: need help for handling IRQ7
« Reply #10 on: July 02, 2012, 10:13:10 PM »
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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

digelo

  • Regular Member
  • *
  • Posts: 24
  • I HATE C!!!
Re: need help for handling IRQ7
« Reply #11 on: July 02, 2012, 10:51:21 PM »
ah i never heard of it in windows :D

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: need help for handling IRQ7
« Reply #12 on: July 03, 2012, 11:31:41 AM »
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

  • Global Moderator
  • Member
  • *****
  • Posts: 1196
Re: need help for handling IRQ7
« Reply #13 on: July 03, 2012, 02:59:30 PM »
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

  • Regular Member
  • *
  • Posts: 24
  • I HATE C!!!
Re: need help for handling IRQ7
« Reply #14 on: July 03, 2012, 04:37:33 PM »
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.