Skip to content

Commit 3a2087f

Browse files
committed
Basic high-level docs for the new PrawnBlaster device.
1 parent 82871bc commit 3a2087f

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

docs/source/devices.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Pseudoclocks provide the timing backbone of the labscript_suite. These devices p
1616
devices/pulseblaster_no_dds
1717
devices/opalkellyXEM3001
1818
devices/pineblaster
19+
devices/prawnblaster
1920
devices/rfblaster
2021

2122
NI DAQS
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
PrawnBlaster
2+
============
3+
4+
This labscript device controls the `PrawnBlaster <https://github.com/labscript-suite/PrawnBlaster>`_ open-source digital pattern generator based on the `Raspberry Pi Pico <https://www.raspberrypi.org/documentation/rp2040/getting-started/>`_ platform.
5+
6+
Specifications
7+
~~~~~~~~~~~~~~
8+
9+
The PrawnBlaster takes advantage of the specs of the Pico to provide the following:
10+
11+
* Configurable as 1, 2, 3, or 4 trulty independent pseudoclocks.
12+
13+
- Each clock has its own independent instruction set and synchronization between clocks is not required.
14+
- Assuming the default internal clock of 100 MHz, each clock has:
15+
16+
- Minimum pulse half-period of 50 ns
17+
- Maximum pulse half-period of 42.9 s
18+
- Half-period resolution of 10 ns
19+
20+
* 30,000 instructions (each with up to 2^32 repetitions) distributed evenly among the configured pseudoclocks; 30,000, 15,000, 10,000, and 7,500 for 1, 2, 3, 4 pseudoclocks respectively.
21+
* Support for external hardware triggers (external trigger common to all pseudoclocks)
22+
23+
- Up to 100 retriggers (labscript-suite waits) per pseudoclock
24+
- Each wait can support a timeout of up to 42.9 s
25+
- Each wait is internally monitored for its duration (resolution of +/-10 ns)
26+
27+
* Can be referenced to an external LVCMOS clock
28+
* Internal clock can be set up to 133 MHz (timing specs scale accordingly)
29+
30+
Installation
31+
~~~~~~~~~~~~
32+
33+
In order to turn the standard Pico into a PrawnBlaster, you need to load the custom firmware available in the `Github repo <https://github.com/labscript-suite/PrawnBlaster/tree/master/build/prawnblaster>`_ onto the board. The simplest way to do this is by holding the reset button on the board while plugging the USB into a computer. This will bring up a mounted folder that you copy-paste the firmware to. Once copied, the board will reset and be ready to go.
34+
35+
Note that this device communicates using a virtual COM port. The number is assigned by the controlling computer and will need to be determined in order for BLACS to connect to the PrawnBlaster.
36+
37+
Usage
38+
~~~~~
39+
40+
The default pinout for the PrawnBlaster is as follows:
41+
42+
* Pseudoclock 0 output: GPIO 9
43+
* Pseudoclock 1 output: GPIO 11
44+
* Pseudoclock 2 output: GPIO 13
45+
* Pseudoclock 3 output: GPIO 15
46+
* External Triggeer input: GPIO 0
47+
* External Clocl input: GPIO 20
48+
49+
Note that signal cable grounds should be connected to the digital grounds of the Pico for proper operation.
50+
51+
The PrawnBlaster provides up to four independent clocklines.
52+
They can be accessed either by `name.clocklines[int]`
53+
or directly by their auto-generated labscript names `name_clock_line_int`.
54+
55+
An example connection table that use the PrawnBlaster:
56+
57+
.. code-block:: python
58+
59+
from labscript import *
60+
61+
from labscript_devices.PrawnBlaster.labscript_devices import PrawnBlaster
62+
from labscript_devices.NI_DAQmx.models.NI_USB_6363 import NI_USB_6363
63+
64+
PrawnBlaster(name='prawn', com_port='COM6', num_pseudoclocks=1)
65+
66+
NI_USB_6363(name='daq', MAX_name='Dev1',
67+
parent_device=prawn.clocklines[0], clock_terminal='/Dev1/PFI0',
68+
acquisition_rate=100e3)
69+
70+
AnalogOut('ao0', daq, 'ao0')
71+
AnalogOut('ao1', daq, 'ao1')
72+
73+
if __name__ == '__main__':
74+
75+
start(0)
76+
77+
stop(1)
78+
79+
80+
Detailed Documentation
81+
~~~~~~~~~~~~~~~~~~~~~~
82+
83+
.. automodule:: labscript_devices.PrawnBlaster
84+
:members:
85+
:undoc-members:
86+
:show-inheritance:
87+
:private-members:

0 commit comments

Comments
 (0)