Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

controlling GPIOs from DOS (Announce)

posted by bretjohn Homepage E-mail, Rio Rancho, NM, 09.12.2013, 05:15

> By 1 Mhz I mean that each access to the port (read or write) is 1 µs. so it
> corresponds to 8Mbps in your speed system measurements.

Well, that is very different. As someone else noted above, I'm not sure I really believe a standard parallel port can actually reach the speeds I've heard some claim it can reach (12~16 Mbps). It is WAY faster than a serial port, though.

> I am not looking for big data transfer, but I need to access the "real
> world" quite often and with a short cpu time.

So, is your real issue the fact that you need to wait for it to happen and can't use the CPU for other things, or do you actually need "real-time" control of the device? IOW, will your system fall apart if you process the data transfers in the background that may get queued and delayed a several microseconds or even milliseconds?

> At the present time I use paralle port with "inportb(0x378)" instruction,
> and it takes about 1us.

INT 17h probably won't be any faster than accessing the I/O ports directly, it's just an easier interface to use.

How are you measuring the strobe timing?

> I would prefer if it took less time, for example 0.1us. But I don't know
> much about efficient low-level access.

According to RBIL, you're supposed to hold the strobe for at least 5 microseconds on a standard parallel port, so you're not going to get down into the sub-microsecond range with your timing, at least using standard parallel ports. Also, according to the IEEE 1284, the device has up to 35 milliseconds to respond to a request for data in the reverse direction, and it doesn't sound like you can wait anywhere near that long.

If you can handle the latency/queueing issues mentioned above, USB might be a good approach. USB is packet-based, though, so has a lot of inherent latency issues that can't be overcome, so can't really be used for true real-time processes.

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 389 users online (0 registered, 389 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum