>
> >We are using an old Mac for visual stimulus. New Macs
> >do not have serial ports. Do you have plan to implement
> >a MEX file in your ToolBox to control USB ports?
Applications do not directly control USB ports. Instead they call device
drivers which call the operating system's USB stack which sets registers in
the USB hardware, controlling the ports. Applications are usually blind to
the fact that the devices which they communicate with are on the USB bus,
because all the USB stuff is hidden to them, on the underside of the device
driver on down. This is unlike with RS-232, where applications often talk to
a port driver, not to a device driver for the hardware at the other end of
your serial cable. It can work that way with RS-232, but with USB that
arrangement is pretty much unavoidable.
Despite what David said, I think the answer is that we would not support
controlling USB ports in the Psychtoolbox. However, if you would like to
control from within Matlab a particular USB device or class of USB devices,
then it is possible that we would add support to the Psychtoolbox for
them. ( on that subject, Psychtoolbox universal USB joystick drivers for
Windows should be out within the week, and, separately, I have one of these
http://www.activewireinc.com/usb_info.htm in hand)
As for communicating between two machines: USB is a master/slave
arrangement, your computer, the master, directs communication over the bus
to downstream devices, the slaves. There can be only one master, but there
can be multiple slaves. It's not peer-to-peer like RS-232 where, except for
the mapping of signals to pins (DTE or DCE), both parties are equals. So
connecting two computers --USB master devices-- together isn't going to work,
unless you can find a USB gadget which sits between and mediates.
> You can purchase
> cards with serial ports quite cheaply, which
> is a way to do serial communciations on newer
> Macs.
>
Another option is the KeySpan USB to Serial adapter which does work with the
PsychToolbox SERIAL function on Mac.
http://www.keyspan.com/products/usb/usa28x/
http://www.us.buy.com/retail/product.asp?sku=10153361&loc=14577
There are other USB to Serial adapters for Mac available, and they would
probably work just as well with the Psychtoolbox as the Keyspan. I'm
mentioning the Keyspan specifically because I have one here, I've used it
with the Psychtoolbox, and it works.
Best,
Allen