Skip to content

Latest commit

 

History

History
103 lines (69 loc) · 3.57 KB

pyboard.rst

File metadata and controls

103 lines (69 loc) · 3.57 KB

Pyboard

workflow.dot

LED Pattern Legend

Green, orange and blue:

Pyboard tries to connect to software on the host computer.

Blue:

Copy mode.

Orange:

Pyboard is armed.

Green:

Delivering sequence.

Green, Blue:

Stimulus active.

Red:

Computer writes to filesystem of pyboard. Warning! Do not unplug or reset the board in this state as files might be corrupted.

Red/Green flashing:

An error occured while executing the scripts on the board.

Standalone use

The pyboard can also be used without COSplay on the host computer. To enter this use case press the 'USR' button on the board, when the green, orange and blue LED light up simultaneously after the board started.

To load sequences onto the pyboard you need to enter the copy mode. Double click the 'USR' button, when the green, orange and blue LED light up simultaneously after the board started. The board should now present itself to the computer as a mass storage device, and the blue LED should light up. Copy the sequence files into the sequence_library folder on the board/SD.

NOTE: Do not forget to safely remove or unmount the board before restarting or disconnecting it --- unlike a normal memory stick, you are using this device as part of a timed scientific experiment, which may be delayed or inevitably compromised by corrupted memory.

The board can be restarted by pressing the 'RST' button.

Delivered sequences will be stored in delivered_sequences/sequencesX/sequenceY.tsv, where X and Y are numbers. A new folder delivered_sequences/sequencesX is created for every reboot of the pyboard.

NOTE: You have to delete old sequences manually.

Sequence Errors

Before deliverying a sequence, the board checks its consistency. If the period is smaller than the pulse width or the values in the out_channel column are not integers between 1 and 6, a SequenceError is raised.

In case the board misses a scheduled onset time or end time of a pulse, an error message is displayed. Furthermore, all error messages are stored in a file errors.txt in the same directory as sequence.tsv.

If the board is operated in μs accuracy mode, the earliest possible onset time for the first event is approximately 320μs due to computational overhead. For smaller onset times, the board inevitably misses the scheduled event, and reports the incident as described above. In ms mode this delay is negligible.

Runtime Errors

For debugging purposes, exceptions are stored in exceptions.txt on the board.

NOTE: Syntax errors are not handled, as they are raised before execution. You can use a programme like 'screen', 'minicom' or 'picocom' to debug syntax errors.

Circuit

The following figure shows the circuit used with the pyboard. BNC 1 and 2 can short circuit the incoming BNC. Ports 3 and 4 can deliver ~4.2V TTL pulses. Port 5 and 6 allow changing the amplitude of a TTL pusle (max. ~3.3V). Exact output values depend on the input voltage of the USB port.

image

config.py

Library path

If one copies sequences to the board manually, the path to the directory containing the sequences can be spcified in library_path.

Accuracy

accuracy can be 'us' for μs-mode or 'ms' for ms-mode.

On values for out channels

The values in this section are the values a pin takes when a stimulus is delivered. If no stimulus is to be delivered, the pin takes the oposite value.