The A2060L is a LWDAQ device that produces sequences of pulses autonomously so as to flash or stimulate lamps or other external devices. We configure the A2060L's pulse sequence with one or more LWDAQ commands, and then instruct it to execute the sequence with a final command. The circuit provides two switching outputs: a TTL logic signal and a 0-11 V analog signal.

The A2060L is a Programmable Logic Head (A2060) with circuits that produce the analog and logic output signals, as well as drive the indicator lamps. Two BNC sockets deliver the lamp control signals to some external lamp driver circuit. Two blue LEDs next to these sockets indicate the state of the output.

The panel LED next to the logic output is on when the logic output turns on the external lamp. Because the polarity of logic signal can be configured as positive-true or negative-true, the LED may be on when the logic output is 0 V. But by default, the logic output is positive-true, so the LED will be on when the output is HI. A TTL HI is anything above 2.4 V, but our circuit outputs 3.3 V.
The analog output is always 0 V when the external lamp should be off, and 0-11 V when the lamp should be on. We assume the lamp driver will take this lamp control voltage and use it to determine the brightness of the lamp. The blue indicator LED next to the analog output has brightness proportional to the analog voltage. When the analog output is 11 V continuously, the blue LED is so bright it is hard to look at directly when at arm's length.
We designed it to control LED drivers that flash LEDs in brain tissue in optogenetics experiments. But it could be used to provide sequences of pulses for any other purpose. In the Operation section below, we describe the details of how to control the A2060L with the LWDAQ. In the Controller section, we present a script that makes it easy for you to generate the code that produces the A2060L stimuli you want, and so transfer these stimuli to other scripts.
To operate the A2060L, we configure it with one or more commands and then instruct it to start the sequence we have defined. The pulse length is the length of the on-pulses in milliseconds. The interval length is the average time between pulses. The sequence length is the number of pulses the sequence contains. The sequence ends when this number of pulses have occured. The time at which a pulse occurs within its interval can be fixed or random according to enable randomize. The polarity of the logic output can be positive or negative-true according to set polarity.
The A2060L is a LWDAQ device. It obtains power for its internal logic from the LWDAQ. The LWDAQ command bits are assigned as follows.
| DC16 | DC15 | DC14 | DC13 | DC12 | DC11 | DC10 | DC9 | DC8 | DC7 | DC6 | DC5 | DC4 | DC3 | DC2 | DC1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | WAKE | LB | X | X | OC3 | OC2 | OC1 | OC0 |
Bits D7..D0 form the data byte that is written to an internal registers on the A2060L. The OC3..OC0 bits form the operation code that selects which register is written. The following table give the operation code functions, and summarizes how the data value affects each operation.
| Code (Decimal) |
Code (Hex) |
Operation | Data Function |
|---|---|---|---|
| 0 | 0 | clear settings | none |
| 1 | 1 | start stimulus | 1 to start, 0 to stop |
| 2 | 2 | set polarity | 0 for positive, 1 for negative |
| 3 | 3 | set brightness | ×11.5 V ÷ 256 |
| 4 | 4 | set pulse length high byte | ×256 ms |
| 5 | 5 | set pulse length low byte | ×1 ms |
| 6 | 6 | set interval length high byte | × 256 ms |
| 7 | 7 | set interval length low byte | × 1 ms |
| 8 | 8 | set stimulus length high byte | × 256 pulses |
| 9 | 9 | set stimulus length low byte | × 1 pulse |
| 10 | A | enable randomizer | 1 to enable, 0 to disable |
We can send commands to the A2060L using the Diagnostic Instrument. We enter the hexadecimal value of the sixteen-bit command in the Command window, direct the instrument at our A2060L target, and press Transmit. We can even enter several commands into the Command window. But we prefer use the following script to test the operation of the A2060L. Copy and paste it in the LWDAQ Toolmaker and adjust the ip_addr and driver_socket to select your A2060L in your own LWDAQ sytem. When you press Execute a window will open with an entry box to list your commands and a Transmit button.
# Send a sequence of LWDAQ commands to a device
# upon button press. List the commands in the
# entry box in hexadecimal format.
set p(commands) "0080 FF83 2087 0185 0181"
set p(text) $t
set p(ip_addr) "129.64.37.88"
set p(driver_socket) 5
set p(mux_socket) 1
button $f.transmit -text Transmit -command Transmit
entry $f.commands -textvariable p(commands) -width 60
pack $f.transmit $f.commands -side left -expand yes
proc Transmit {} {
global p
set sock [LWDAQ_socket_open $p(ip_addr)]
LWDAQ_set_driver_mux $sock $p(driver_socket) $p(mux_socket)
foreach c $p(commands) {
LWDAQ_transmit_command_hex $sock $c
}
LWDAQ_socket_close $sock
LWDAQ_print $p(text) $p(commands)
}
In our example, we begin with code 0080, which executes operation zero, or clear settings. All the length values are now zero, the polarity of the output is positive-true and the randomizer is off. The 8 in the command is there to wake up the A2060L's internal ±15 V power supplies, which are used by the analog output circuit. All the codes we send to the A2060L have an 8 in the same hexadecimal digit.
The FF83 code sets the analog on-voltage to its maximum value, using the number 255 for the data. When the lamp is on, the analog voltage will be roughly 11.5 V. When it is off, the voltage will be 0 V.
The 2087 sets the low byte of the interval length to 20 hex, which is 32, so that the average pulse separation will be 32 ms. We do not have to set the high byte to zero because we already did that with the clear operation.
The 0185 sets the low byte of the pulse length to 1, so we will have 1-ms pulses. Once again, the high byte of the pulse length is already zero. The final command sets the stimulus in motion by sending a one with the start stimulus operation.
You will note that our commands do not specify the number of pulses. The stimulus length is zero. The zero value indicates that the A2060L should continue flashing for an infinite number of pulses.
The commands "0080 8083 3285 0786 D087 2788 1089 018A 0181" configures the A2060L to send 1000 pulses each of duration 50 ms with average spacing 2000 ms, but random displacement of pulses is turned on. The analog voltage would be 5.75 V.
The commands "0080 DE83 0585 3287 6489" specify 100 pulses of 5 ms with fixed interval 50 ms and output voltage 10 V. But we have not yet sent the start command, 0181, so in this case the A2060L is ready to perform this stimuls when it receives a start command. Once the stimulus is completed, we can send another start command and it will begin again. If we send the start command before the stimulus is completed, the start command is ignored. If we want to stop a stimulus, we use a stop comamnd, 0081. To re-start we use a stop followed by a start, "0081 0181".
If we want to turn the lamp on continuously, we send a pulse length that is greater than the interval length, and leave the stimulus length at zero. Thus "0080 FF83 0285 0187 0181" asks for 2-ms pulse with 1-ms period and so results in the lamp being turned on all the time.
The A2060L uses a fifteen-bit linear shift register to generate a pseudo-random sequence of 32767 fifteen-bit numbers. It uses these numbers, to offset the output pulse from the start of the pulse interval. With the enable randomize instruction we can turn on or off the displacement of pulses in time by the randomizer.
The operation codes and pulse sequencing are defined in the A2060L's programmable logic chip. You will find the source code of the logic program in the Code Directory, with a name like P2060Lxx.ABL.
The Lamp Controller script is a LWDAQ Tool you can run in the LWDAQ program. It creates the following control panel for defining and transmitting stimulus instructions to the A2060L.

The tool converts decimal values into the sixteen-bit binary commands understood by the A2060L. It will print out in its text window a script that creates the effect of its Stimulate button. You can cut and paste this script into other programs so as to implement these effects without having to work out all the binary commands for yourself.
For more design details, see the A2060 Manual.
S2060_1: LVDS Transceiver and Logic Chip.
S2060_2: Light Emitting Diodes and IO Lines.
S2060L_3: Expansion Circuit for A2060L, the Lamp Controller.