--- /dev/null
+#!/usr/bin/perl -w
+use URI::Escape;
+use lib '../scripts/';
+use lib '../../scripts/';
+use Mimosis;
+use Data::Dumper;
+use HADES::TrbNet;
+
+trb_init_ports() or die trb_strerror();
+
+eval{
+ htsponse(200,"OK");
+ print "Content-type: text/html\r\n\r\n";
+ };
+
+my ($fpga,$reg,$value) = split('-',$ENV{'QUERY_STRING'});
+
+$fpga = hex($fpga) if $fpga =~ /^0x/;
+
+my $val;
+my @registers = (
+"], #IBIAS 0 - 80 nA , 312 pA Pixel current ",
+"], #ITHR 0 - 2.5 nA , 9.8 pA Pixel current ",
+"], #IDB 0 - 40 nA , 157 pA Pixel current ",
+"], #VRESET 0.37 - 1.79 V , 6 mV Pixel input amplifier reset voltage ",
+"], #VPL 0.37 - 1.79 V , 6 mV Pixel voltage for charge injection (low value) ",
+"], #VPH 0.37 - 1.79 V , 6 mV Pixel voltage for charge injection (high ",
+"], #VPH_FINE 0 - 256 mV , 1 mV value) VPH+VPH_FINE ",
+"], #VCASP 0 - 1.54 V , 6 mV Pixel voltage ",
+"], #VCASNA 0 - 1.54 V , 6 mV Pixel threshold voltage for submatrix A ",
+"], #VCASNB 0 - 1.54 V , 6 mV Pixel threshold voltage for submatrix B ",
+"], #VCASNC 0 - 1.54 V , 6 mV Pixel threshold voltage for submatrix C ",
+"], #VCASND 0 - 1.54 V , 6 mV Pixel threshold voltage for submatrix D ",
+"], #VCASN2 0 - 1.54 V , 6 mV Pixel voltage ",
+"], #VCLIP 0 - 1.54 V , 6 mV Pixel clipping amplifier voltage ",
+"], #IBUFBIAS 0 - 10 μA , 312 pA Internal buffer bias (not in pixel) ",
+
+
+);
+
+
+for my $i (0..14) {
+ $val = Mimosis::mimosis_register_read($fpga, $i+0x40,1); #single access mode as default
+ $val &= 0xff;
+ printf("[0x00%02x, %3i%s\n",$i+0x40,$val,$registers[$i]);
+ }
+
+exit 1;
<body>
<h1>DAC Control</h1>
<div class="dac_container">
- FPGA <input class="dac_input" type="text" id="fpga" onChange="loadvalues()">
+ FPGA <input class="dac_input" type="text" id="fpga" onChange="loadvalues()"> <a id="DownloadLink" href="getdacfile.pl" download="CONF_dac.pl" target="_blank">Download</a>
<div class="slider_container"> <div class="slider_name">VCASP</div> <input class="dac_input" id="VCASP" type="range" min="0" max="255" step="1.0" value="67" onChange="send('VCASP')"><div class="slider_value" id="VCASPtxt"></div></div>
<div class="slider_container"> <div class="slider_name">VCASNA</div> <input class="dac_input" id="VCASA" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASA')"><div class="slider_value" id="VCASAtxt"></div></div>
<div class="slider_container"> <div class="slider_name">VCASNB</div> <input class="dac_input" id="VCASB" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASB')"><div class="slider_value" id="VCASBtxt"></div></div>
loadvalues();
function loadvalues() {
+ document.getElementById("DownloadLink").href="getdacfile.pl?"+document.getElementById("fpga").value;
getData("getdac.pl?"+document.getElementById("fpga").value,"",showDacs);
}