Qudi
phdefin.h
1 /*
2 
3 This file contains the header file of the defined constants of the Picoharp300 device.
4 
5 Qudi is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 
10 Qudi is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with Qudi. If not, see <http://www.gnu.org/licenses/>.
17 
18 Copyright (c) the Qudi Developers. See the COPYRIGHT.txt file at the
19 top-level directory of this distribution and at <https://github.com/Ulm-IQO/qudi/>
20 
21 */
22 
23 
24 /*
25 Taken from:
26 http://www.picoquant.com/products/category/tcspc-and-time-tagging-modules/picoharp-300-stand-alone-tcspc-module-with-usb-interface
27 
28 PHLib programming library for PicoHarp 300
29 PicoQuant GmbH, December 2013
30 */
31 
32 
33 #define LIB_VERSION "3.0"
34 
35 #define MAXDEVNUM 8
36 
37 #define HISTCHAN 65536 // number of histogram channels
38 #define TTREADMAX 131072 // 128K event records
39 
40 #define MODE_HIST 0
41 #define MODE_T2 2
42 #define MODE_T3 3
43 
44 #define FEATURE_DLL 0x0001
45 #define FEATURE_TTTR 0x0002
46 #define FEATURE_MARKERS 0x0004
47 #define FEATURE_LOWRES 0x0008
48 #define FEATURE_TRIGOUT 0x0010
49 
50 #define FLAG_FIFOFULL 0x0003 //T-modes
51 #define FLAG_OVERFLOW 0x0040 //Histomode
52 #define FLAG_SYSERROR 0x0100 //Hardware problem
53 
54 #define BINSTEPSMAX 8
55 
56 #define SYNCDIVMIN 1
57 #define SYNCDIVMAX 8
58 
59 #define ZCMIN 0 //mV
60 #define ZCMAX 20 //mV
61 #define DISCRMIN 0 //mV
62 #define DISCRMAX 800 //mV
63 
64 #define OFFSETMIN 0 //ps
65 #define OFFSETMAX 1000000000 //ps
66 
67 #define SYNCOFFSMIN -99999 //ps
68 #define SYNCOFFSMAX 99999 //ps
69 
70 #define CHANOFFSMIN -8000 //ps
71 #define CHANOFFSMAX 8000 //ps
72 
73 #define ACQTMIN 1 //ms
74 #define ACQTMAX 360000000 //ms (100*60*60*1000ms = 100h)
75 
76 #define PHR800LVMIN -1600 //mV
77 #define PHR800LVMAX 2400 //mV
78 
79 #define HOLDOFFMAX 210480 //ns
80 
81 
82 //The following are bitmasks for return values from GetWarnings()
83 
84 #define WARNING_INP0_RATE_ZERO 0x0001
85 #define WARNING_INP0_RATE_TOO_LOW 0x0002
86 #define WARNING_INP0_RATE_TOO_HIGH 0x0004
87 
88 #define WARNING_INP1_RATE_ZERO 0x0010
89 #define WARNING_INP1_RATE_TOO_HIGH 0x0040
90 
91 #define WARNING_INP_RATE_RATIO 0x0100
92 #define WARNING_DIVIDER_GREATER_ONE 0x0200
93 #define WARNING_TIME_SPAN_TOO_SMALL 0x0400
94 #define WARNING_OFFSET_UNNECESSARY 0x0800
95