Ancient ISA i/o board.

More
16 Sep 2012 03:59 #24292 by jgilmore
I need to write a rt kernel wrapper for the "OUT al,0x300" instruction to set the output pins. Point me at some examples? Any pointers?

I'm quite comfortable in C and x86 assembler. I've been using Linux for about 13 years now. I'm mostly a software guy. I am also an electrician. Not so experienced with heavy machine tools like this monster (4500lbs) but I've been looking forward to it. I'm going to need some help, and I hope to find some of it here.

I picked up an old CNC mill for the right price. It was free :woohoo:! Because the software to run it had been lost - the boot sector, FAT, and root directory of the floppy disk (1.44M 3 1/2" floppy) had become corrupted. It's been parked in a backyard for about six months with minimal protection. Table is rusted but screws and slides seem fine. 5hp mill head, 3 phase 208volt. The company that made it, Colorado Numerical Control, Inc (cute acronym) is out of business. I have the programming manual but not the technical specs, nor detailed information on the board or other hardware.

I'll be getting either a VFD or a phase converter to run the mill head with. As soon as I have the money anyway. For the next few weeks my budget for this project matches the invested amount. Be nice to have the software and control electronics all set up when it gets here.

The electronics consist of box for the servo and motor drivers and relays, and a separate controls box which contains a VGA monitor and a standard PC motherboard with this proprietary IO card in it. And a AMD 386SX with Wietek math coprocessor, 8Megs of memory, and no hard drive at all, but that's not the point of the story.

I think I've got the card figured out. It's entirely discrete logic chips (flip flops and so forth) but the key insights are:
1. It reads the /IOW and /IOR pins, not the memory or DMA or anything pins. I.E. it's strictly in IO port space.
2. It reads only the lower 10 bits of the address bus. Typical for IO pin stuff, which is what limits the PC architecture to 0x3ff IO ports.
3. The lower two address pins (bits 0 and 1) go off somewhere on the board, but the upper 8 (bits 2-9) are compared to a 8 pin dip switch, currently set to 11111100. Which makes it address 0x300-0x303 or 0xFC-0xFF. Almost certainly 0x300 as that's apparently a common one for IO boards.
4. The card has a 37 pin D-sub connector on the back.
5. I have no idea what it would use an IRQ for, but it's disabled so I don't have to care.

Combine all that and I've concluded that it's a 32-bit port, with the remaining pins being ground, +5V, etc. One is +12V for instance. Probably with some pins dedicated to read and some to write, probably in chunks of eight bits. And that it shouldn't take much fiddling to figure out which port reads or writes to which pin. It may be a bit challenging to get the controls (i.e. the PC) powered with the servos and mill head shut down so that I can fearlessly probe things, but I figure a few hours with MS-DOS's "debug" command and a multimeter should give me the information I need. Both with regards to which ports are read vs. write and the machine-specific information - which pins go where and control or read what.

Additionally, the output latch chips are all socketed, so if I accidentally blow one up it's still not a complete loss, just a major setback.

I already have an older PC with an ISA slot and around 400 Meg of memory. I'm in the process of installing ubuntu+linuxcnc (complicated by bad network card and bad CD-ROM drive, but whatever. I'll get 'er done)

So all I have to do is write a kernel driver which translates from whatever the RT interface expects into a "OUT AL,0x300" or "IN 0x300,AL" instruction. Doesn't sound too difficult, it's just one instruction.

Can anyone point me to something fairly close that I could modify a little?

I've put a largish image of the board in question in spoiler tags. The preview doesn't show it, I'm hoping that's just a glitch.

Warning: Spoiler!
Attachments:

Please Log in or Create an account to join the conversation.

More
16 Sep 2012 04:07 #24293 by jmelson
Replied by jmelson on topic Re:Ancient ISA i/o board.
jgilmore wrote:

I need to write a rt kernel wrapper for the "OUT al,0x300" instruction to set the output pins. Point me at some examples? Any pointers?

I[/spoiler]

I think that board is by Metrabyte or one of the similar outfits.
I have one of their DMA interface boards in one of my old projects.

Look at the hal_parport.c driver for the generic parallel port, it should have all the
functions you need. Just strip out the bidirectional stuff and make 4 output
registers at consecutive addresses, and that should do it.

But, you may be making a big mistake. You could probably get a PCI
general purpose I/O board from several outfits and have something
that will work on modern PCs. You may even find one that uses the
same 37-pin pinout.

Jon

Please Log in or Create an account to join the conversation.

More
16 Sep 2012 04:38 #24295 by jgilmore
Replied by jgilmore on topic Re:Ancient ISA i/o board.
jmelson wrote:

I think that board is by Metrabyte or one of the similar outfits.
I have one of their DMA interface boards in one of my old projects.

Look at the hal_parport.c driver for the generic parallel port, it should have all the
functions you need. Just strip out the bidirectional stuff and make 4 output
registers at consecutive addresses, and that should do it.


Thank you! That's exactly the sort of thing that I was looking for. I'll be taking a closer look as soon as I get linuxcnc installed on that old box.

But, you may be making a big mistake. You could probably get a PCI
general purpose I/O board from several outfits and have something
that will work on modern PCs. You may even find one that uses the
same 37-pin pinout.

Jon


Most of the IO boards I looked at where over $100. I know that the mill in working condition is probably worth 8K or so, and I AM willing to spend the money to get it up to snuff, but I don't have a single red cent to spend on it at the moment. OK, well maybe $10 or $20, but that's the upper limit for now. I've been laid off, I have more time than money for now.

Besides, for the initial workup I figured I'd be better off staying as close to the original as possible. After I get it working, lubed, and have a better idea what I'm dealing with it may be worthwhile to upgrade. And that'll be much simpler with my specs and notes in hand!

Please Log in or Create an account to join the conversation.

More
16 Sep 2012 05:26 #24297 by PCW
Replied by PCW on topic Re:Ancient ISA i/o board.
Take a look at this thread:

www.linuxcnc.org/index.php/english/compo...=27&id=12389&limit=6

(it may even be a similar card)

Please Log in or Create an account to join the conversation.

More
16 Sep 2012 21:42 #24314 by andypugh
Replied by andypugh on topic Re:Ancient ISA i/o board.
jmelson wrote:

Look at the hal_parport.c driver for the generic parallel port, it should have all the
functions you need.


I wrote a driver for an ISA board a little while ago, all in "comp"
It is included in the standard build now, but you can see the source here:http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob;f=src/hal/drivers/pcl720.comp;h=35fbca94620a330d288be4527ef82ea8c65f4e2e;hb=refs/heads/v2.5_branch
It wan't even particularly difficult.

I never even saw the board, we did it by remote control in this thread:
linuxcnc.org/lucid/index.php/english/com...ew&catid=38&id=10910

Please Log in or Create an account to join the conversation.

More
17 Sep 2012 00:29 #24320 by jgilmore
Replied by jgilmore on topic Re:Ancient ISA i/o board.
PCW wrote:

Take a look at this thread:

www.linuxcnc.org/index.php/english/compo...=27&id=12389&limit=6

(it may even be a similar card)


That board looks the same down to the placement of the resistors and capacitors. There's no nice silkscreened label on mine, and the traces are laid out slightly differently, but there's so strong a resemblance that I'm almost forced to conclude that it's a slightly different revision of the same board.

I've perused the linked PDF file, which funnily enough says "You should use the universal library or one of the packaged application programs mentioned above to control your board. Only experienced programmers should try register-level programming." Then refers you to another PDF if you want details about the registers.

I downloaded that one:

www.mccdaq.com/registermaps/RegMapCIO-DIO24-Series.pdf

Which fortunately still exists. It has details about how to set the input/output modes of the three eight bit ports using the 4th port. Most excellently useful information. Thank you.

Please Log in or Create an account to join the conversation.

More
06 Oct 2012 00:18 #25041 by jgilmore
Replied by jgilmore on topic Re:Ancient ISA i/o board.
Using the material about the PCI DIO 24D in the linked thread, I was able to verify the pinouts using a multimeter and booting into freedos and using the "debug" command to read from ports 300-302. I was able to verify quite a bit before I hit the wrong pin and the computer powered off. It won't turn on at all anymore :blush:

Oh well, it was an old clunk acquired specifically for this project anyway. I actually found two of them, one has a ISA "trident TVGA 9800D" video card that X refuses to recognize, the other refuses to enable lapic. And the one that I just killed segfaulted every time I tried to run a latency test. So no huge loss.

However, based on what I learned I've concluded that it is in fact a ISA DIO24D card, and I've purchased one of these:

www.ebay.com/itm/Access-PCI-DIO-24D-PCI-...&hash=item1e722e7b81

and will be installing it in a more modern motherboard. It should be pin compatible and I'm pretty sure that linuxcnc already has the modules required to interface to it.

While I wait for that to arrive, I'll be installing linuxcnc from the ubuntu liveCD on a more modern extra computer I have lying around. I hope its latency tests come out OK. If not I'll have to go scrounging again.

Thank you one and all, you pointed me at the information I needed to figure this stuff out.

Incidentally, I did find contact information for "tom woods" who posted in 2009 saying that he used to work for robotool, and could help with the veriform controller (which my mill apparently has) but he still hasn't replied to my email.

He gave the email address This email address is being protected from spambots. You need JavaScript enabled to view it., and a phone number which has been disconnected. I don't suppose that anybody knows a "Tom Winn" who used to live in Austin, TX?

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.390 seconds
Powered by Kunena Forum