Hi My friends,

My company made a very old motor controller, it's a ISA card. It works under
DOS now. Our customer and my boss want it can be worked on Windows
operating system(XP or NT)

I checked its source code( for DOS 6.22), most of controls are done by
writing and reading from several I/O addresses. As I know in windows, I
can not access low level I/O directly.

Would you like to tell me how to do it? I think i need to write a driver for
it. If you could give me some information on how to write device driver, I
will really appreciate it. I 'm a VC++ programmer, but I never wrote
driver before.

If you'd like to write to me, you email address is lchang@andec.ca

Thanks ahead.

Larry

Re: How to write and read from a I/O address directly in VC++? by Maxim

Maxim
Mon Jun 21 14:34:49 CDT 2004

What are the latency requirements of this hardware?

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


"Larry" <lchang@andec.ca> wrote in message
news:_pqdnZ8kk-QRq0rd4p2dnA@look.ca...
> Hi My friends,
>
> My company made a very old motor controller, it's a ISA card. It works under
> DOS now. Our customer and my boss want it can be worked on Windows
> operating system(XP or NT)
>
> I checked its source code( for DOS 6.22), most of controls are done by
> writing and reading from several I/O addresses. As I know in windows, I
> can not access low level I/O directly.
>
> Would you like to tell me how to do it? I think i need to write a driver for
> it. If you could give me some information on how to write device driver, I
> will really appreciate it. I 'm a VC++ programmer, but I never wrote
> driver before.
>
> If you'd like to write to me, you email address is lchang@andec.ca
>
> Thanks ahead.
>
> Larry
>
>



Re: How to write and read from a I/O address directly in VC++? by Larry

Larry
Mon Jun 21 16:08:48 CDT 2004

Hello Maxim,



What you want to know is latency time, isn't it? I'm sorry I don't know
right now, I have to talk to the designer of the controller. I think the
shorter the better. This controller is used to control movement of 4 axes.
The cpu of the controller is Z80 ( very old).



Larry



"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:%23bs8TZ8VEHA.2996@TK2MSFTNGP12.phx.gbl...
> What are the latency requirements of this hardware?
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>
> "Larry" <lchang@andec.ca> wrote in message
> news:_pqdnZ8kk-QRq0rd4p2dnA@look.ca...
> > Hi My friends,
> >
> > My company made a very old motor controller, it's a ISA card. It works
under
> > DOS now. Our customer and my boss want it can be worked on Windows
> > operating system(XP or NT)
> >
> > I checked its source code( for DOS 6.22), most of controls are done by
> > writing and reading from several I/O addresses. As I know in windows,
I
> > can not access low level I/O directly.
> >
> > Would you like to tell me how to do it? I think i need to write a driver
for
> > it. If you could give me some information on how to write device
driver, I
> > will really appreciate it. I 'm a VC++ programmer, but I never wrote
> > driver before.
> >
> > If you'd like to write to me, you email address is lchang@andec.ca
> >
> > Thanks ahead.
> >
> > Larry
> >
> >
>
>



Re: How to write and read from a I/O address directly in VC++? by Maxim

Maxim
Mon Jun 21 16:33:27 CDT 2004

If the latency requirements are very high (higher then, say, RS-232 port)
then it is very real that the device will not be able to work in Windows.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


"Larry" <lchang@andec.ca> wrote in message
news:5KadnR-lZrn900rd4p2dnA@look.ca...
> Hello Maxim,
>
>
>
> What you want to know is latency time, isn't it? I'm sorry I don't know
> right now, I have to talk to the designer of the controller. I think the
> shorter the better. This controller is used to control movement of 4 axes.
> The cpu of the controller is Z80 ( very old).
>
>
>
> Larry
>
>
>
> "Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
> news:%23bs8TZ8VEHA.2996@TK2MSFTNGP12.phx.gbl...
> > What are the latency requirements of this hardware?
> >
> > --
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > maxim@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > "Larry" <lchang@andec.ca> wrote in message
> > news:_pqdnZ8kk-QRq0rd4p2dnA@look.ca...
> > > Hi My friends,
> > >
> > > My company made a very old motor controller, it's a ISA card. It works
> under
> > > DOS now. Our customer and my boss want it can be worked on Windows
> > > operating system(XP or NT)
> > >
> > > I checked its source code( for DOS 6.22), most of controls are done by
> > > writing and reading from several I/O addresses. As I know in windows,
> I
> > > can not access low level I/O directly.
> > >
> > > Would you like to tell me how to do it? I think i need to write a driver
> for
> > > it. If you could give me some information on how to write device
> driver, I
> > > will really appreciate it. I 'm a VC++ programmer, but I never wrote
> > > driver before.
> > >
> > > If you'd like to write to me, you email address is lchang@andec.ca
> > >
> > > Thanks ahead.
> > >
> > > Larry
> > >
> > >
> >
> >
>
>



Re: How to write and read from a I/O address directly in VC++? by Arthur

Arthur
Tue Jun 22 03:09:43 CDT 2004

may be you can use WinIO, by "google", which offer you api to access I/O
address under user mode

--
Arthur Tu
bst wish



Re: How to write and read from a I/O address directly in VC++? by Pavel

Pavel
Tue Jun 22 05:39:59 CDT 2004

So your boss got a little problem. Your DOS machines probably
won't run NT - let alone XP. And new machines have no ISA slots.
Even if they have, faster CPU can cause incompatibility.

Maybe a better solution will be to leave the DOS machines as is,
and control them remotely from XP.
--

"Larry" <lchang@andec.ca> wrote in message news:_pqdnZ8kk-QRq0rd4p2dnA@look.ca...
> Hi My friends,
>
> My company made a very old motor controller, it's a ISA card. It works under
> DOS now. Our customer and my boss want it can be worked on Windows
> operating system(XP or NT)
>
> I checked its source code( for DOS 6.22), most of controls are done by
> writing and reading from several I/O addresses. As I know in windows, I
> can not access low level I/O directly.
>
> Would you like to tell me how to do it? I think i need to write a driver for
> it. If you could give me some information on how to write device driver, I
> will really appreciate it. I 'm a VC++ programmer, but I never wrote
> driver before.
>
> If you'd like to write to me, you email address is lchang@andec.ca
>
> Thanks ahead.
>
> Larry
>
>



How about 7ms latency time? by Larry

Larry
Tue Jun 22 08:57:44 CDT 2004

Hi Maxim,

I checked old source code again, there are 7 ms delay between commands send
to controller. Can windows operating system meet this requirement?

Best Regards

Larry



Re: How about 7ms latency time? by Maxim

Maxim
Tue Jun 22 09:09:59 CDT 2004

Doubts. You can try to do this delay, but it can turn out to be, say, 100ms
or such.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


"Larry" <lchang@andec.ca> wrote in message
news:KJydnSDRo91Fp0Xd4p2dnA@look.ca...
> Hi Maxim,
>
> I checked old source code again, there are 7 ms delay between commands send
> to controller. Can windows operating system meet this requirement?
>
> Best Regards
>
> Larry
>
>



Can I use Win IO to realize it? by Larry

Larry
Tue Jun 22 09:36:52 CDT 2004

Hi maxim,

Thank you very much for your help and time.

Arthur suggested to use WINIO. Do you think it will work?

Is that possible to write a driver for the controller, and I communicate
just to driver, and let driver deal with real control. Is this a solution?

Could you recommend a book or site for device driver developing?

Best regards,

Larry



Re: How to write and read from a I/O address directly in VC++? by Larry

Larry
Tue Jun 22 09:38:47 CDT 2004

Hello Arthur,

Thank you for your help. I have downloaded the winio library. But I need
some time to dig into it.

Regards,

Larry



Re: Can I use Win IO to realize it? by Maxim

Maxim
Tue Jun 22 09:44:58 CDT 2004

> Arthur suggested to use WINIO. Do you think it will work?

It works, but forget about any latency guarantees with WINIO.

> Is that possible to write a driver for the controller, and I communicate
> just to driver, and let driver deal with real control. Is this a solution?

Yes, this is the usual and the recommended solution.

> Could you recommend a book or site for device driver developing?

DDK documentation on msdn.microsoft.com
Solomon/Russinovich on general concepts of the kernel
Walter Oney on programming

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: How to write and read from a I/O address directly in VC++? by Gary

Gary
Tue Jun 22 09:45:23 CDT 2004

In which case, you can absolutely guarantee that you will NEVER achieve a 7
ms window of response time. The driver/apps that "open" limited IO access to
the application layer have always only been recommended for slow devices and
only for lab environments. Hitting a 7ms window in the kernel is difficult
enough without having to go to the application layer.

That's a really foolish recommendation when you consider the timing
constraints. NT4 and above has a 10 ms quantum that is going to beat an
application trying to use a 7ms timing aperture bloody.

--
Gary G. Little
Seagate Technologies, LLC

"Arthur Tu" <arthurtu@163.com.discuss> wrote in message
news:eYXRKBDWEHA.1164@tk2msftngp13.phx.gbl...
> may be you can use WinIO, by "google", which offer you api to access I/O
> address under user mode
>
> --
> Arthur Tu
> bst wish
>
>



Re: How to write and read from a I/O address directly in VC++? by Tim

Tim
Tue Jun 22 09:53:49 CDT 2004

I'm totally unfamiliar with programming these devices.
And for that matter, hardware control under windows.

That said, can you create multiple interspaced threads?

I understand that might be a true ignorant suggestion.
What the hell? Two cents ain't worth much these days.



Thank you very much by Larry

Larry
Tue Jun 22 10:03:18 CDT 2004

Hi Maxim,
Thank you very much for your help. I'll try WinIO first. I think it is the
easiest way for me.

Regards,

Larry



Re: How to write and read from a I/O address directly in VC++? by Gary

Gary
Tue Jun 22 11:14:35 CDT 2004

Sure you can, but each thread has a 10 ms quantum. Trying to access IO from
an application is a bad idea, and throwing more threads at the issue is
simply exacerbating the problem. IO is best done in the kernel by a device
driver.

--
Gary G. Little
Seagate Technologies, LLC

"Tim Reago" <infoz@edenspeace.com> wrote in message
news:%23F4Z1hGWEHA.2176@TK2MSFTNGP11.phx.gbl...
> I'm totally unfamiliar with programming these devices.
> And for that matter, hardware control under windows.
>
> That said, can you create multiple interspaced threads?
>
> I understand that might be a true ignorant suggestion.
> What the hell? Two cents ain't worth much these days.
>
>