# Re: timing control

**URL:** <https://psychtoolbox.discourse.group/t/re-timing-control/1001>\
**Category:** Uncategorized\
**Created:** [September 29, 2003, 11:34pm UTC](https://psychtoolbox.discourse.group/t/re-timing-control/1001 "2003-09-29T23:34:12Z")\
**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:** [September 29, 2003, 11:34pm UTC](https://psychtoolbox.discourse.group/t/re-timing-control/1001/1 "2003-09-29T23:34:12Z")

</div>

On Thursday, September 18, 2003, at 09:17 AM, Kinjiro Amano wrote:  
  

> \> Recently I have seen a demonstration of Bits++ by  
> \> the Cambridge Research System.  
> \> I was informed that the box can be controlled by PsychoToolBox.  
> \>  
> \> Having look around PsychoToolBox web pages, I have still got some  
> \> concerns about compatibility of the functions between Windows  
> \> and Mac platform.  
> \>  
> \> One of critical issue is whether display timing can be fully  
> \> controlled on Windows 2000 or XP.  
> \>  
> \> Would it be possible to direct me where I could find this  
> \> information? Are there any further information  
> \> other than on "[http://psychtoolbox.org/win.html"?](http://psychtoolbox.org/win.html"?)  
> \>  
> \> Or, should I post on the forum? even if it is about Bits++?

Dear Kinjirio,  
  
As far as I know there are no timing problems with the Psychtoolbox on   
Windows 2000 or XP. To insure good timing with the Windows   
Psychtoolbox there are two things:  
1- Use Rush or Priority.  
2- Use calls to GetSecs at time-critical points in your script to check   
that you really do get the timing that you expect. Usually, this would   
be between calls to Screen('WaitBlanking') to be sure that the delay   
between those calls really is equal to the frame period.  
  
It is fine to post to the forum about anything related to the   
Psychtoolbox or more broadly, psychophysical displays or methods. We   
encourage public discussion and we only moderate to keep out unrelated   
advertising spam.  
  
I have not merged the Cambridge Bits++ code into the Win Psychtoolbox.   
Unless Cambridge Research Systems has done on that, then the only   
Psychtoolbox it works with is for now is the OS 9 Psychtoolbox.  
  
best,  
  
Allen  
  
  
  
  
  

> On Thursday, September 18, 2003, at 09:17 AM, Kinjiro Amano wrote:  
>    
> \> Dear Allan,  
> \>  
> \> Recently I have seen a demonstration of Bits++ by  
> \> the Cambridge Research System.  
> \> I was informed that the box can be controlled by PsychoToolBox.  
> \>  
> \> Having look around PsychoToolBox web pages, I have still got some  
> \> concerns about compatibility of the functions between Windows  
> \> and Mac platform.  
> \>  
> \> One of critical issue is whether display timing can be fully  
> \> controlled on Windows 2000 or XP.  
> \>  
> \> Would it be possible to direct me where I could find this  
> \> information? Are there any further information  
> \> other than on "[http://psychtoolbox.org/win.html"?](http://psychtoolbox.org/win.html"?)  
> \>  
> \> Or, should I post on the forum? even if it is about Bits++?  
> \>  
> \> Thank you very much for your help in advance.  
> \>  
> \> Best regards,  
> \> Kinjiro  
> \>  
> \> --  
> \> Kinjiro Amano  
> \> Dept Optometry & Neuroscience, UMIST  
> \>  
> \> [k.amano@...](mailto:k.amano@...)  
> \>

---

<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:** [October 3, 2003, 2:03am UTC](https://psychtoolbox.discourse.group/t/re-timing-control/1001/2 "2003-10-03T02:03:44Z")

</div>

Here's the thing you need to know about the Bits++. You control  
it's lookup table by writing the clut into the first line of  
the frame buffer. This is very straightforward to do from  
any platform that allows you to write to the frame buffer.  
  
The code in the Mac version of the toolbox should be  
platform independent, since it just calls Screen to to it's  
thing (no MEX files involved). I wrote that code, but I  
haven't tested it on any other platform. On the Mac they  
work great -- we collect data using them every day.  
  
There are some subtleties in the Bits++ timing you need  
to think through. Since the lookup table is coded in the  
frame buffer, you have to make sure it gets completely  
updated before the raster passes that code. What I do  
(at least, this is how I remember it)  
is wait for blanking, then wait a few milliseconds, then  
write the clut. The new clut is then clocked in on the next  
frame. This makes the timing a bit different from a standard  
clut, where you typically write it right after the vertical  
blanking and it takes effect on that frame.  
  
DB  
  
  

> \> \> Recently I have seen a demonstration of Bits++ by  
> \>\> the Cambridge Research System.  
> \>\> I was informed that the box can be controlled by PsychoToolBox.  
> \>\>  
> \>\> Having look around PsychoToolBox web pages, I have still got some  
> \>\> concerns about compatibility of the functions between Windows  
> \>\> and Mac platform.  
> \>\>  
> \>\> One of critical issue is whether display timing can be fully  
> \>\> controlled on Windows 2000 or XP.  
> \>\>  
> \>\> Would it be possible to direct me where I could find this  
> \>\> information? Are there any further information  
> \>\> other than on "[http://psychtoolbox.org/win.html"?](http://psychtoolbox.org/win.html"?)  
> \>\>  
> \>\> Or, should I post on the forum? even if it is about Bits++?  
> \>  
> \>  
> \>Dear Kinjirio,  
> \>  
> \>As far as I know there are no timing problems with the Psychtoolbox on  
> \>Windows 2000 or XP. To insure good timing with the Windows  
> \>Psychtoolbox there are two things:  
> \>1- Use Rush or Priority.  
> \>2- Use calls to GetSecs at time-critical points in your script to check  
> \>that you really do get the timing that you expect. Usually, this would  
> \>be between calls to Screen('WaitBlanking') to be sure that the delay  
> \>between those calls really is equal to the frame period.  
> \>  
> \>It is fine to post to the forum about anything related to the  
> \>Psychtoolbox or more broadly, psychophysical displays or methods. We  
> \>encourage public discussion and we only moderate to keep out unrelated  
> \>advertising spam.  
> \>  
> \>I have not merged the Cambridge Bits++ code into the Win Psychtoolbox.   
> \>Unless Cambridge Research Systems has done on that, then the only  
> \>Psychtoolbox it works with is for now is the OS 9 Psychtoolbox.  
> \>  
> \>best,  
> \>  
> \>Allen  
> \>  
> \>  
> \>  
> \>  
> \>  
> \>On Thursday, September 18, 2003, at 09:17 AM, Kinjiro Amano wrote:  
> \>  
> \>\> Dear Allan,  
> \>\>  
> \>\> Recently I have seen a demonstration of Bits++ by  
> \>\> the Cambridge Research System.  
> \>\> I was informed that the box can be controlled by PsychoToolBox.  
> \>\>  
> \>\> Having look around PsychoToolBox web pages, I have still got some  
> \>\> concerns about compatibility of the functions between Windows  
> \>\> and Mac platform.  
> \>\>  
> \>\> One of critical issue is whether display timing can be fully  
> \>\> controlled on Windows 2000 or XP.  
> \>\>  
> \>\> Would it be possible to direct me where I could find this  
> \>\> information? Are there any further information  
> \>\> other than on "[http://psychtoolbox.org/win.html"?](http://psychtoolbox.org/win.html"?)  
> \>\>  
> \>\> Or, should I post on the forum? even if it is about Bits++?  
> \>\>  
> \>\> Thank you very much for your help in advance.  
> \>\>  
> \>\> Best regards,  
> \>\> Kinjiro  
> \>\>  
> \>\> --  
> \>\> Kinjiro Amano  
> \>\> Dept Optometry & Neuroscience, UMIST  
> \>\>  
> \>\> [k.amano@...](mailto:k.amano@...)  
> \>\>  
> \>  
> \>  
> \>  
> \>[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/)
