Jump to content

Anyone with knowledge about DIO cards ?


Nat
 Share

Recommended Posts

Propably not an easy way.. or readily available solution.

But if you (or your company) has sample code for using the card I think it should be possible to program midi device driver for it. (More or less doin' ripping on public domain source code and providing some glue code)

Bye, Moebius

/edit  ;)

But why not using (just to be build) MIDIO128?!

Link to comment
Share on other sites

I hope that you only need on/off switching ;)

MIDIO128 provides TTL level outputs, triggered by (for example) midi notes, this is propably ok, for midi side?!

For interfacing to (I'm assuming) mains powered equipment there is an example, using relays. (Check MIDIO128 page) Proper relays are good for switching (and driving) heavily loaded ac lines. But as being a mechanical components, relays are kind of slow.  

Another way is using TRIACs. I'm not sure how much load TRIACs can handle. I found couple of links for reference:

(AC switching with TRIAC from TTL)

http://www.ee.washington.edu/circuit_archive/circuits/F_ASCII_Schem_PC.html

(PIC 16C63 Midi controlled Light dimmer ;) )

http://www.mindspring.com/~jlittle/picstuff.html

But Warning: HIGH VOLTAGE! You should really know what you are doing, even before thinking of project with high voltages present. :o

---

But anyway, how is that particular computer Digital I/O board interfaced to control lighting?

---

Bye, Moebius

p.s. I think that midi controlled dimming will be available as soon as upcoming AOUT module is finished ;)

Link to comment
Share on other sites

that's a good question.  The I/O card goes in a big breaker box that is made by the same company.

there are pictures at the bottom of the page :

http://www.measurementcomputing.com/cbicatalog/cbiproduct.asp?dept%5Fid=142&pf%5Fid=668&mscssid=SHCRJS5VFSVE9GUF4F7JK392MSQ60DUD

This is to drive normal lamps, 100watts maximum.  Dimming is a plus for sure.

Link to comment
Share on other sites

Ok,

It should be even possible to connect MIDIO128 direct to that breakout box, both use TTL levels.

Both relay and TRIAC methods are okay normal lamps, I guess.

What I meant with that "midi controlled dimming with AOUT", was that then standard 0-10v dimming equipment can be interfaced with midibox.. (It could be done with TRIACs, by means of pulsewidth modulating triacs triggering thus affecting its on time -> ac duty cycle.. but that is with extra programming efford.)

Bye, Moebius

Link to comment
Share on other sites

Thanks, I have a very basic question,

In the electrical world, what is the difference between digital signals and analog signals ?  I assume that digital signals uses a pulse waveform to mimic the on/off paradigm, but this is just a guess.

Thanks,

nat

Link to comment
Share on other sites

I got to talk with the person who installed the card, while he did not answer all my questions, he did tell me a few useful tips.

The card is on an ISA bus in the PC and spawns 4 addresses (usually 300h,301h,302h,303h)

The first 3 addresses are the digital inputs/outputs pins, so to send a message to an output, you send the adress and the proper byte (0-7).  

Anyone has a clue on how to send messages to an physical address on a pc ?

Thanks,

Nat

Link to comment
Share on other sites

You can use DOS debug command to try it out:

In dos prompt type "debug":

syntax is:

-o [port address] [hex byte]

I guess that those bytes are a hex presentation of 8 bit wide output, so with one write sets all output pins of that port:

Just use binary, like 10011001 -> convert to hex: 99

like:

-o 300 99

to quit debug use: -q

In programming, it's just writing bytes to correct address.

Bye, Moebius

Link to comment
Share on other sites

Thanks, I'm glad to see I can manage this using dos commands.

I know the card upon reset of the computer is set as inputs only, so I'll have to find the command to set the ports as outputs.

The next goal will be to write an external for Maxmsp in C so I can send info from max to the card.  I guess that will be the hard part...

Link to comment
Share on other sites

Great!! ;D

But problems ahead: WinNT/W2k/XP ->No DOS, no debug and if my memory serves me right: NT based Windows prohibits any "user space" programs directly accessing peripherals.

But you can overcome this (and writing device driver ;) ) by using special I/O driver, check:

http://www.beyondlogic.org/porttalk/porttalk.htm

Just drop it in the system (reboot ;) ) and check the sample code (in C) for information. Then: Happy Coding ;)

Link to comment
Share on other sites

Oh, it IS there?! ;)

You should try running it as argument for allowio.exe from PortTalk package like:

allowio debug.exe /a

(that /a grants rights to ANY i/o addresses, so be careful. You can also use exact i/o address as like 0x300 or something)

Check the documentation!!

Bye, Moebius

Link to comment
Share on other sites

Thanks, I will try both this and a dll a friend sent to me :

http://www.programmersheaven.com/zone15/cat610/22947.htm

This is a dll containing functions to acess IO ports from programs written in C, C++, Vb and other.  This might help me if I want to write an object in C for Max/msp. I guess that object in C can link to that DLL. (If I udnerstand what a dll is)

The thing I wonder now is will that be possible using a PCI version of the card, the technical support guy told me that I needed to talk to a PCI abstraction layer or something like that before I can send bytes to the card.

Link to comment
Share on other sites

Oh yes, I checked that package too.. Just thought that PortTalk could be easier to use, as there is 'bout complete C-example included. (Uses LTP1, but easily adapted to different I/O range)

That "talk to a PCI abstraction layer".. well, I'm not sure, but I think this means using operating system, and so called memory mapped I/O.. (but these things are getting way out of my knowledge (as most of this) ;) )

But even as it's a PCI device, there is a possibility, that it can be used with port I/O. If you have that PCI card handy give it a try, with debug first--

Ok, checked it out, it's I/O mapped. Here's link for document explaining it's registers, in other words, what bytes to write and where in it's i/o space:

http://www.measurementcomputing.com/registermaps/RegMapPCI-DIO24X.pdf

/edit: more..

Link to comment
Share on other sites

Thanks, so If I understand that PDF well, the PCI board as a chip on it that will allow register level programming ?  If that's the case I think I'm in buisness :)  That means It would work under xp and with a PCI card using porttalk or the io.dll file.

Edit : From the pdf : "Only experienced programmers should attempt register-level programming"

That sounds funny to me, I'm not a programmer and sending bytes directly to the card seems way more simple to me :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...