32
elements
enabling technologies for Life Science
SECTION 3 –
Software installation and description
if
strfind(line,
'Sampling frequency (SR):'
) >= 0
[unused, firstToken] = strtok(line);
[unused, secondToken] = strtok(firstToken);
[unused, thirdToken] = strtok(secondToken);
switch
str2double(strtok(thirdToken))
case
200
OSR = 50;
sampl = 10000000;
% HS -> 10 MHz sampling
case
100
OSR = 100;
sampl = 10000000;
% HS -> 10 MHz sampling
case
50
OSR = 200;
sampl = 10000000;
% HS -> 10 MHz sampling
case
40
OSR = 32;
case
20
OSR = 64;
case
10
OSR = 128;
case
5
OSR = 256;
case
1.25
OSR = 1024;
end
end
end
if
OSR == 0
OSR = 64;
display(
'Warning: cannot read sampling rate from header file, using default (20 kHz)'
);
end
fclose(fid);
% close file
else
% select number of channels
display(
'Enter number of channels:'
);
sel = input(
'N: '
);
Nch = str2double(sel);
% select sampling frequency
display(
'Select bandwidth:'
);
display(
'1) 625 Hz'
);
display(
'2) 1.25 kHz'
);
display(
'3) 5 kHz'
);
display(
'4) 10 kHz'
);
display(
'5) 20 kHz'
);
sel = input(
'select 1,2,3,4,5: '
);
switch
sel
case
1
OSR = 1024;
case
2
OSR = 512;
case
3
OSR = 128;
case
4
OSR = 64;
case
5
OSR = 32;
otherwise
display(
'Error: invalid selection'
);
return
end
% select range
display(
'Select range:'
);
display(
'1) 200 pA'
);
display(
'2) 20 nA'
);
sel = input(
'select 1,2: '
);