(Installation instructions are at the end of this file.)
Macintosh computers are great for synthesizing and displaying images for vision experiments. However, the 8-bit resolution of their digital-to-analog converters is inadequate to render threshold-contrast stimuli, typically yielding on-screen contrasts that are only accurate to about 7 bits, because of the monitor's factor-of-two contrast gain. (RasterOps sells a few video cards with 9-bit DACs, but their video drivers have problems see the "Video bugs" document.) Pelli and Zhang (1991) describe a simple electronic circuit, a video attenuator, that provides accurate contrast control, achieving 12-bit on-screen accuracy from any 8-bit DAC. You can build one yourself, from their schematic, or you can order one pre-made from the Institute for Sensory Research, which calls it the "ISR Video Attenuator."
The ISR Video Attenuator is a small box that is inserted between the video cable and the Apple High-Resolution Monochrome Display. It combines the three color RGB signals from a color video card to produce a single monochrome signal of higher grayscale resolution. Only programs using special software (provided) will achieve this benefit. Physically, it is a small satin-finish machined-aluminum box, about the size of a matchbox (2"x1.2"x0.7"), with a 15-pin Apple video connector at each end. Inside are precision resistors on a two-sided printed circuit board with controlled-impedance microstrip traces. This passive resistor network combines the three 8-bit RGB signals from your video card to produce a single much-higher-accuracy signal to drive your Apple High-Resolution Monochrome Display.
IMPORTANT NOTE: The (now obsolete) Apple 12" Monochrome Display has a built-in video cable, making it impossible to place the Video Attenuator between the cable and monitor. It is however, possible to use two video extender cables to achieve the correct electical connection.
D. G. Pelli and L. Zhang (1991) Accurate control of contrast on microcomputer displays. Vision Research, 31:1337-1360.
PACKING LIST
- ISR Video Attenuator. ISR stands for "Institute for Sensory Research".
- Reprint of Pelli and Zhang (1991), which includes instructions for use and a schematic.
- 3.5" Macintosh disk with free "Video Toolbox" software written in THINK C for generating visual stimuli and making optimal use of the Video Attenuator on your Mac. The software is also available separately, still free; just send me email or a reprint request, but be sure to include your mailing address as the VideoToolbox is too big for email. (I use this software. I think it's well documented and works well, but I'm not offering to support it. You're on your own. That's why the software is free.) However, there are some restrictions on distribution and commercial use of the VideoToolbox software. Please read the restrictions in its "Read me" file.
YOU WILL ALSO NEED
Symantec: THINK C
Apple High-Resolution Monochrome Display
color video card or built-in video
photometer for luminance calibration
YOU MAY NEED
The ISR Video Attenuator does not pass all the sense lines that identify the kind of monitor to the computer. (Apple invented the sense line scheme after our design was already committed to copper.) Thus the ISR Video Attenuator will make all monitors appear to be a 640x480x67 Hz display. If you have a different display resolution then you need to provide the correct "sense line" information to your computer at start up time so that it can correctly identify your monitor and configure the video timing appropriately. If you were building your own video attenuator then the easiest thing to do would be to pass through all the sense lines (i.e. connect all wires between the two 15-pin video connectors). If you're using the ISR Video Attenuator then the easiest solution is to buy a universal adapter "Mac Liberty Adapter" that attaches between your computer and the video cable and allows you to mimic the sense lines of any monitor.
Mac Liberty Adapter $39.95
Enhance Cable Technology
730 North Ninth Street
San Jose, CA 95112
800-343-2425
408-293-2425
408-293-2468 fax
YOU MAY ALSO WANT TO HAVE
Cambridge University Press: Numerical Recipes in C
Data Translation FORERUNNER A/D Card, or equivalent, to digitize photometer output
ORDERING INFORMATION
The ISR Video Attenuator is for research. As such it is licensed, not sold. The license has no time limit and is transferable. The accompanying Video Toolbox software for creating visual stimuli is supplied free, and is available separately to anyone, but may not be sold without permission.
Checks should be made payable to Syracuse University. The price of US$150 includes shipping in US. If you're in New York State then you either need to add sales tax or attach the New York State document excusing your institution from paying sales tax.
SEND ORDERS TO
Electronics Shop
Institute for Sensory Research
Syracuse University
Merrill Lane
Syracuse, NY 13244-5290
(315)-443-4164
Art_Wixson@ISR.SYR.EDU
DISCLAIMER
Denis Pelli has no financial involvement in the ISR Video Attenuator.
INSTALLATION
To install your ISR Video Attenuator, unplug your video cable from your Apple High-Resolution Monochrome Display, plug the cable into the attenuator and plug the attenuator into your monitor.
Once the attenuator is installed, you should run the program CalibrateLuminance to calibrate your monitor, attenuator, and video card. You will need a photometer in order to use that program. Once it's finished CalibrateLuminance will produce a new file called LuminanceRecord?.h, where "?" is the screen number of your monitor. (This screen number is similar to but not the same as the monitor number used by the Monitors control panel device.) This file describes the gamma function and RGB gains of your video card and attenuator. It is a C header file. You can cause its contents to be included in any program by writing
#include <LuminanceRecord1.h>
where "1" must be replaced by the screen number of your monitor, as determined by the program CalibrateLuminance or the subroutine GetScreenDevice(). Alternatively,
you can read the file at runtime by calling
ReadLuminanceRecord("LuminanceRecord1.h",&LR,0);
where &LR is a pointer to your luminance record struct. I recommend the latter approach, because it makes your program portable across monitors. Later, when you write programs (or compile the supplied demonstrations), your LuminanceRecord file will allow them to accurately control the luminance of your display. The relevant subroutines are all in the file called Luminance.c. Documentation is in the file Luminance.h. Note that LuminanceRecord1.h and LuminanceRecord2.h are provided as samples in the VideoToolboxSources folder, so that the demonstration programs can be compiled even before you have calibrated your own display. However, before doing any serious experiment it is essential that you replace the example by a new LuminanceRecord file that describes your own display.
Alternatively, you can read the LuminanceRecord?.h file at runtime, using the new subroutine ReadLuminanceRecord.c in the VideoToolbox.
The ISR video attenuator is intended for use with the Apple High-Resolution Monochrome Display. It also works perfectly with the Apple High Resolution RGB Display, but uses only the green input, ignoring the monitor's red and blue inputs.
With a minor modification, the ISR video attenuator can be used with any monitor that uses the Apple standard D-15 connector and accepts a separate synch. Subsequent to manufacture of the ISR video attenuator, Apple introduced new video cards that automatically sense the particular kind of monitor that is attached. To do this they use pins 4, 7, and 10 of their 15-pin video connector as sense lines. These pins were formerly either grounded (pin 4) or unused (pins 7 and 10). All the video cards currently sold by Apple (and the built in video of the newer Macs) have auto-sensing. These video cards will be fooled by the ISR attenuator (since it grounds pin 4 and leaves pins 7 and 10 open) into thinking that they are connected to an Apple High-Resolution Monochrome or RGB Display (both have 640x480 pixels at 67 Hz). If you want to use a different display you could either make yourself a custom cable, copying the treatment of pins 4, 7, & 10 from your monitor, or you could modify the ISR Video Attenuator. The modification is to disconnect the ISR attenuator's pin 4 from ground, on both input and output connectors, and to wire the input sensing pins to the output sensing pins, i.e. 4 to 4, 7 to 7, and 10 to 10. This will allow your video card to correctly sense the monitor type.
Good luck.
APPENDIX 1: The pin-out of Apple Video connectors, from Apple.
Table 2 Signal Assignments for the DB-15 External Video Connector
Pin Signal Name Signal Description
1 RED.GND Red Ground
2 RED.VID Red Video Signal
3 /CSYNC Composite Sync Signal
4 SENSE0 Monitor Sense Line 0
5 GRN.VID Green Video Signal
6 GRN.GND Green Ground
7 SENSE1 Monitor Sense Line 1
8 n.c. Not Connected
9 BLU.VID Blue Video Signal
10 SENSE2 Monitor Sense Line 2
11 C&VSYNC.GND Ground for CSYNC & VSYNC
12 /VSYNC Vertical Sync Signal
13 BLU.GND Blue Ground
14 HSYNC.GND HSYNC Ground
15 /HSYNC Horizontal Sync Signal
Excepted from Apple's New Tech Note "HW 30 - Sense Lines".
Revised May 1994
Ever wonder how to set up an Apple video card or Macintosh built-in video to support various size monitors? Well, this Technical Note will tell you everything you need to know about what monitors are supported and how.
Sense Lines
The Sense Line Protocol was implemented when Apple recognized the need for a mechanism that would allow a display card to identify the monitor connected to it. For example, the built-in video display circuitry on the Macintosh Quadra and on the PowerBook 160, 165c, and others, can configure themselves according to the monitor that is connected at boot time. The identification scheme works fine, but there is one problem. Three sense lines limit the number of different monitors to seven plus the no-connect case. To overcome this limitation, newer display cards and built-in video use an extension to the sense line scheme that allows for 28 new codes.
The extension is based on the following idea: When the display circuitry senses a configuration that in the original scheme signals “no display connected” (in other words, when all three sense lines are not grounded), the card pulls down each sense line, one by one, and reads back what the other lines return. To return a unique code, the only requirement is that the sense lines be connected, in the cable or the monitor itself, by wires or diodes. The beauty of this idea is that existing monitors are detected correctly. Newer monitors, such as the Apple 16" Color Display, can have their own encoding, and the circuitry for detecting new monitors is relatively simple. Since there are no active components, adding the encoding to new or existing monitors involves only a few inexpensive diodes and a little wire.
(The original Apple document goes on to list the codes for many of Apple's monitors. You probably can use ftp to download the original document from one of Apple's ftp sites, which are listed in the VideoToolbox "Advice" document.)
APPENDIX 2
The MacLiberty Adapter is a 15-pin-D to 15-pin-D adapter that programs the Apple video sense lines to mimic any monitor. Around $30. From: