# Re:

**URL:** https://psychtoolbox.discourse.group/t/re/681
**Category:** Uncategorized
**Created:** [July 11, 2002, 5:10pm UTC](https://psychtoolbox.discourse.group/t/re/681 "2002-07-11T17:10:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ingling7](https://avatars.discourse-cdn.com/v4/letter/i/e79b87/32.png) [@ingling7](https://psychtoolbox.discourse.group/u/ingling7)
#### Post date: [July 11, 2002, 5:10pm UTC](https://psychtoolbox.discourse.group/t/re/681/1 "2002-07-11T17:10:25Z")

</div>

Martin Köhnlein wrote:  
  

> \> I want to control an electric stimulator by using Matlab &   
> \> Psychtoolbox running on a PC. Could you please tell me how I can drive   
> \> with Matlab this external device or could you tell me where I can look   
> \> that up?  
> \>

Dear Martin,  
  
It is not possible to answer your question without knowing what kind of   
control inputs your electric stimulator expects. Could you supply that   
information ?   
  
Here is some information about how to interface the Psychtoolbox to   
external devices, but without knowing more about your equipment I do not   
know if either of these is applicable:   
  
If digital logic, such as TTL, then:   
The Psychtoolbox for both Mac and Windows now includes functions for   
control of the ActiveWire USB device. Activewire gives you 16 bits of   
programmable bi-directional digital I/O. The ActiveWire web site is here:  
[http://www.activewireinc.com/](http://www.activewireinc.com/)  
  
If the stimulator has a serial port:  
You can use the Psychtoolbox PsychSerial command to send and receive   
from the serial port.  
  
Best,  
  
Allen  
  
PS. I am copying this reply to the Psychtoolbox forum. I suggest that   
if you reply with the specifications of the stimulator that you send a   
message there. It is possible that others who read the forum have   
already solved the problem. Denis, David and I will also see the   
message if it is sent there.  
  
  
  
Martin Köhnlein wrote:  
  

> \>  
> \> Dear Mr. Ingling,  
> \>  
> \> I want to control an electric stimulator by using Matlab &   
> \> Psychtoolbox running on a PC. Could you please tell me how I can drive   
> \> with Matlab this external device or could you tell me where I can look   
> \> that up?  
> \>  
> \> Thank you very much.  
> \> Yours, Martin Köhnlein  
> \>  
> \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \> Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden:   
> \> [http://messenger.msn.de](http://messenger.msn.de)  
> \>

---

<div class="post-metadata">

### Author: ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)
#### Post date: [July 11, 2002, 6:10pm UTC](https://psychtoolbox.discourse.group/t/re/681/2 "2002-07-11T18:10:56Z")

</div>

Martin et al.,  
  
On the PC (and hopefully soon on the Mac again!!), we use MATLAB's Data   
Acquisition Toolbox to interface with the outside world (in our case, an   
eyetracker and servo motors) via a National Instruments card. The DAQ   
toolbox works seamlessly with the Psychophysics toolbox, which we use for   
our stimulus display.  
  
 -Lar  
  
At 01:10 PM 7/11/2002 -0400, you wrote:  

> \>Martin Köhnlein wrote:  
> \>  
> \> \> I want to control an electric stimulator by using Matlab &  
> \> \> Psychtoolbox running on a PC. Could you please tell me how I can drive  
> \> \> with Matlab this external device or could you tell me where I can look  
> \> \> that up?  
> \> \>  
> \>  
> \>Dear Martin,  
> \>  
> \>It is not possible to answer your question without knowing what kind of  
> \>control inputs your electric stimulator expects. Could you supply that  
> \>information ?  
> \>  
> \>Here is some information about how to interface the Psychtoolbox to  
> \>external devices, but without knowing more about your equipment I do not  
> \>know if either of these is applicable:  
> \>  
> \>If digital logic, such as TTL, then:  
> \>The Psychtoolbox for both Mac and Windows now includes functions for  
> \>control of the ActiveWire USB device. Activewire gives you 16 bits of  
> \>programmable bi-directional digital I/O. The ActiveWire web site is here:  
> \>[http://www.activewireinc.com/](http://www.activewireinc.com/)  
> \>  
> \>If the stimulator has a serial port:  
> \>You can use the Psychtoolbox PsychSerial command to send and receive  
> \>from the serial port.  
> \>  
> \>Best,  
> \>  
> \>Allen  
> \>  
> \>PS. I am copying this reply to the Psychtoolbox forum. I suggest that  
> \>if you reply with the specifications of the stimulator that you send a  
> \>message there. It is possible that others who read the forum have  
> \>already solved the problem. Denis, David and I will also see the  
> \>message if it is sent there.  
> \>  
> \>  
> \>  
> \>Martin Köhnlein wrote:  
> \>  
> \> \>  
> \> \> Dear Mr. Ingling,  
> \> \>  
> \> \> I want to control an electric stimulator by using Matlab &  
> \> \> Psychtoolbox running on a PC. Could you please tell me how I can drive  
> \> \> with Matlab this external device or could you tell me where I can look  
> \> \> that up?  
> \> \>  
> \> \> Thank you very much.  
> \> \> Yours, Martin Köhnlein  
> \> \>  
> \> \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> \> \> Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden:  
> \> \> [http://messenger.msn.de](http://messenger.msn.de)  
> \> \>  
> \>  
> \>  
> \>  
> \>  
> \>  
> \>[http://psychtoolbox.org](http://psychtoolbox.org)  
> \>POST a message to: [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com)  
> \>UNSUBSCRIBE by sending a blank message to:  
> \>[psychtoolbox-unsubscribe@yahoogroups.com](mailto:psychtoolbox-unsubscribe@yahoogroups.com)  
> \>  
> \>Your use of Yahoo! Groups is subject to [http://docs.yahoo.com/info/terms/](http://docs.yahoo.com/info/terms/)

=============================  
Lawrence K. Cormack, Ph.D.  
Associate Professor  
Center for Perceptual Systems  
University of Texas at Austin  
(512) 471-5380; www.cps.utexas.edu
