Send or receive 8 bit TTL events from any computer with a USB port.
Write 8 bit TTL markers using simple serial commands with under 1 msec latency.
Read 8 bit TTL events as serial messages or standard keyboard events with 1 msec latency.
Control TTL write pulse duration with usec resolution. (Optional)
Works with Windows 7/10, Linux, and macOS.
Configure device settings and test device timing using the LabHackers Device Manager application.
Connect to PC parallel port using straight DB25 patch cable (bi-directional data mode supported).
Supported TTL logic levels: 0 - 3.3/5V input; 0 - 3.3V output.
RGB Status LED: Green = Write Mode, Blue = Read Mode, Red = No USB serial connection.
import serial
s = serial.Serial('COM3', baudrate=128000, timeout=0.01)
s.write('READ\n')
ttl_data = s.readline()
print("Current TTL State is {}".format(ttl_data))
Python Example: Wait for a Serial TTL Change Event
ttl_data = None
while ttl_data is None:
ttl_data = s.readline()
print("TTL Event: {}".format(ttl_data))
% define serial connection
s = serial('COM6','BaudRate', 128000, 'DataBits', 8,'Timeout', 0.01);
% Open port
fopen(s);
% Read current 8 bit TTL value
fprintf(s, 'READ\n');
ttl_data = fscanf(s,'%d');
% Close port
fclose(s);
import serial, time
s = serial.Serial('COM3', baudrate=128000, timeout=0.01)
s.write('WRITE 255\n')
time.sleep(0.005)
s.write('WRITE 0\n')
Python Example: Send TTL Pulse of 255 for 5000 Usec (5 Milliseconds)
s.write('WRITE 255 5000 0\n')
%define Serial Port
s = serial('COM6','BaudRate', 128000, 'DataBits', 8);
% Open port for communication
fopen(s)
% write to port
fprintf(s, 'WRITE 255\n');
% insert code to run here
fprintf(s, 'WRITE 0\n');
Matlab Example: Send TTL Pulse of 255 for 5000 Usec (5 Milliseconds)
fprintf(s, 'WRITE 255 5000 0\n');
% close port
fclose(s);
Set TTL Data Mode: 8 bit Read or Write.
Select whether USB Serial or Keyboard events are generated when in Read mode.
Set TTL input to Keyboard key mappings and maximum key press duration.
Read the serial port address assigned to the USB2TTL8 device.
Set optional Read mode flow control settings.
Test USB2TTL8 USB serial and keyboard event delays.
2 Meter Shielded Male to Male DB25 Cable. (DB25-MM2-EXT) | $30.00 USD | |
DB25 Mini M-M Gender Changer. (DB25-MM-GC) | $10.00 USD | |
DB25 Screw Terminal Breakout with Case. (DB25-MST-1) | $15.00 USD |
Supported Operating Systems | Windows 10 / 7, macOS, and Linux |
---|---|
Supported Experiment Software | Any software that allows reading and writing to a USB Serial port. |
USB Connection Type | Full Speed USB 2 Type A (compatible with USB 3)
Use of a USB C port requires a USB C to USB 2 adapter (sold separately). |
USB Serial Sampling Rate | 1000 Hz (1000 per second) |
USB Keyboard Event Sampling Rate | 1000 Hz (1000 per second) |
Serial to TTL Write Latency | 1.0 msec |
TTL Input Change Event Delay1 | 1.0 msec |
Internal TTL Input Read Frequency | 150 kHz |
TTL Input Voltage | 0 - 3.3V (5V tolerant) |
TTL Output Voltage | 3.3 V |
USB Serial | Windows 10 and macOS automatically register the USB2TTL8 as a USB Serial device.
Windows 7 requires a USB Serial driver to be installed. Download it thanks to PJRC. Linux needs UDEV rule change. Download it thanks to PJRC. |
Upgradeable Firmware | Yes, using LabHackers Device Manager Application. |
Case Size | 91 mm x 66 mm x 28 mm |
Case Material | ABS Plastic (Black) |
1 Computer configuration can impact the ability of your computer to read any USB HID device at 1000 Hz. This can potentially result in increased event latencies (higher mean and stdev). Regardless of the USB Serial or Keyboard device or experiment software being used, it is the experiment software that is responsible for accurately time-stamping events as they are received. |