From: hadeshyp Date: Fri, 12 Oct 2012 14:57:55 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=d7e28bca4b34e31b5edc1f6053d7f525feadf8e9;p=daqtools.git *** empty log message *** --- diff --git a/padiwa.pl b/padiwa.pl index 0208689..46389ff 100755 --- a/padiwa.pl +++ b/padiwa.pl @@ -16,6 +16,7 @@ if(!$ARGV[0]) { print "usage: padiwa.pl \$FPGA \$chain \$command \$options\n\n"; print "\t uid \t\t read unique ID, no options\n"; print "\t temp \t\t read temperature, no options\n"; + print "\t dac \t\t set LTC-DAC value. options: \$channel, \$value\n"; print "\t pwm \t\t set PWM value. options: \$channel, \$value\n"; print "\t pwm \t\t read PWM value. options: \$channel\n"; print "\t disable \t set input diable. options: \$mask\n"; @@ -83,6 +84,11 @@ if($ARGV[2] eq "uid") { printf("0x%04x\t%d\t0x%04x%04x%04x%04x\n",$e,$chain,$ids->{$e}->{3},$ids->{$e}->{2},$ids->{$e}->{1},$ids->{$e}->{0}); } } + +if($ARGV[2] eq "dac" && defined $ARGV[4]) { + my $b = sendcmd(0x00300000+$ARGV[3]*0x10000+($value&0xffff)); + print "Wrote PWM settings.\n"; + } if($ARGV[2] eq "pwm" && defined $ARGV[4]) { my $b = sendcmd(0x00800000+$ARGV[3]*0x10000+($value&0xffff));