I am currently working on building a robot out of an old 486 DX2 50mhz. I built a simple cable to allow me to use the parallel port as 8 io lines. Does anyone know of a way to utilize the ISA bus for more io lines, without buying an digital io card? The robot will be a programming platform I can use to ultimately build a two-legged walking semi-humanoid. To program it, I will hook up a monitor and keyboard/mouse, and write the programs using an old C++ compiler and windows 95. The program is then put in startup, and the monitor/mouse/keyboard are disconnected. In the bios, it is set so the computer will boot without a keyboard. The power is turned on, and windows boots, and then the program runs. I also am interested in interfacing to an old Epson A0294-9003F54 graphics display from a word processor, if anyone knows the pinouts.
A great site for Parallel io port interfacing is http://www.epanorama.net/circuits/parallel_output.html
This is where I got the original idea of building a 'robot' out of junk I have around at my house.
My suggestion would be to install something like Damn Small Linux or similar to cut back on overhead and free up some precious RAM - you will also likely find hardware I/O easier as anything running as root user can do whatever the hell it wants. Low level parallel port access is exceedingly simple in Linux.

Of course, that also has the benefit of being able to use modern tools and programs (such as GCC 4), which should ultimately help make things easier.

As for ISA, if you DO go the Linux route you can check out the source for how drivers interact with the ISA slot and see if you can get anything useful out of that (yes, Linux still supports ISA).
Both windows 3.1 and 95/98 supported unrestricted/buffered parallel port access. It is a simple matter of using 1 command to control all eight i/o lines. From what I have read on other sites, this is much more difficult in nt based systems. I am going to try linux because, as you said, it will help conserve my precious 12mb of ram Rolling Eyes .
It's not "much" more difficult; you just have to use different libraries in order for it to work. As far as the ISA bus interfacing goes, I recommend you check out a book called the Robot Builders' Bonanza.
KermMartian wrote:
It's not "much" more difficult; you just have to use different libraries in order for it to work. As far as the ISA bus interfacing goes, I recommend you check out a book called the Robot Builders' Bonanza.


No, it is much more difficult - at least in more recent versions as all hardware I/O is completely locked to Ring0 programs only - think device drivers. At least, that is what I was able to determine while looking into low level hardware I/O....
Kllrnohj wrote:
KermMartian wrote:
It's not "much" more difficult; you just have to use different libraries in order for it to work. As far as the ISA bus interfacing goes, I recommend you check out a book called the Robot Builders' Bonanza.


No, it is much more difficult - at least in more recent versions as all hardware I/O is completely locked to Ring0 programs only - think device drivers. At least, that is what I was able to determine while looking into low level hardware I/O....
I just wrote PartyMode to run in XP using C++ and Visual Studio; no problems whatsoever, and my program definitely isn't ring0. I think it probably buffers the in/outs somewhere for the kernel to take care of.
This is a 486 here...no XP or anything newer than 95. I was wondering if anyone knows if it is possible to send data via 2 parallel ports ( I put in 2 io cards) at the same time, or very close to it? I am planning on setting the 8 io lines of each of the two ports into a 4x4 matrice, yielding 16 io lines, then putting the 2 sets of 16 io lines into a 16x16 matrice to yield a total of 256 io lines.
These io lines would really be for output only. I plan on using 74 series AND chips, because I have alot of them lying around. I want to know if the 2 ports could be accessed at the same time or very close to it, so that the 256 io line idea would work. The controlling does not need to be real precise, since the robot will move around slowly, and anything I build would not be accurate enough to utilize the accuracy a computer is capable of.
elite.lumberjack wrote:
This is a 486 here...no XP or anything newer than 95. I was wondering if anyone knows if it is possible to send data via 2 parallel ports ( I put in 2 io cards) at the same time, or very close to it? I am planning on setting the 8 io lines of each of the two ports into a 4x4 matrice, yielding 16 io lines, then putting the 2 sets of 16 io lines into a 16x16 matrice to yield a total of 256 io lines.
These io lines would really be for output only. I plan on using 74 series AND chips, because I have alot of them lying around. I want to know if the 2 ports could be accessed at the same time or very close to it, so that the 256 io line idea would work. The controlling does not need to be real precise, since the robot will move around slowly, and anything I build would not be accurate enough to utilize the accuracy a computer is capable of.


Well, depending on how slow you will allow yourself it can be really easy. Just read from lp0, and then from lp1 right after each other. Given that even a 486 is faster than a parallel port it *should* be able to read/write to them in this method just fine. If you need truly simultaneous access, you will have to do some threading

Just to give you an idea, in Linux it would just be:


Code:
#include <asm/io.h>
#include <unistd.h>
#include <stdlib.h>

#define lp0 0x3bc
#define lp1 0x378

int main() {
   // get permission
   ioperm(lp0, 3, true);
   ioperm(lp1, 3, true);

   // read
   inb(lp0 + 1);
   inb(lp1 + 1);

   // write
   outb(0xFF, lp0 + 2);
   outb(0xFF, lp1 + 2);

   return EXIT_SUCCESS;
}


See http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html for more info
If I am using the two ports together to control 256 outputs, will the difference in data times effect the 256 outputs? I am planning to have .25 - 5 amp 12 volt motors hooked up to these outputs, to move the robot and make it do various things. The high speed data transfer is done with the serial ports. Also, does anyone have suggestions on power transistors/mosfets to drive the motors from the parallel port signal?

The link above is very useful. Thanks

From the site I got the idea of using the joystick/gameport for analog sensors. I have a Soundblaster 16 isa card.
elite.lumberjack wrote:
If I am using the two ports together to control 256 outputs, will the difference in data times effect the 256 outputs? I am planning to have .25 - 5 amp 12 volt motors hooked up to these outputs, to move the robot and make it do various things. The high speed data transfer is done with the serial ports. Also, does anyone have suggestions on power transistors/mosfets to drive the motors from the parallel port signal?

The link above is very useful. Thanks

From the site I got the idea of using the joystick/gameport for analog sensors. I have a Soundblaster 16 isa card.


I have no idea how fast a parallel port can switch - that is something you will need to google/look up.

As for driving a motor - why not just use a relay?
Would a parallel port supply enough current to use a relay? I know how to use relays better than semiconductors, so I would rather use them to mosfets, if the parellel port can drive them.
elite.lumberjack wrote:
Would a parallel port supply enough current to use a relay? I know how to use relays better than semiconductors, so I would rather use them to mosfets, if the parellel port can drive them.
Not at all. You'd need a step-up BJT or FET stage before you could drive a relay off the parallel port. A good rule of thumb is to not try to pull more than 10mA off the parallel port (per data line).
I think I will just use power transistors to drive the motors from the parallel port output. The power transistor TIP41A seems to be suitable, and not too expensive. Will I need to put a diode across the motor to prevent voltage spikes when the load is removed?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement