packages/web/353/php_top/init347.php

Go to the documentation of this file.
00001 <?php
00002 /*!***************************************************************************
00003 *! FILE NAME  : init347.php
00004 *! DESCRIPTION: Provides initialization of the 10347 board FPGA (called at init)
00005 *! Copyright (C) 2007 Elphel, Inc
00006 *! -----------------------------------------------------------------------------**
00007 *!
00008 *!  This program is free software: you can redistribute it and/or modify
00009 *!  it under the terms of the GNU General Public License as published by
00010 *!  the Free Software Foundation, either version 3 of the License, or
00011 *!  (at your option) any later version.
00012 *!
00013 *!  This program is distributed in the hope that it will be useful,
00014 *!  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 *!  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 *!  GNU General Public License for more details.
00017 *!
00018 *!  You should have received a copy of the GNU General Public License
00019 *!  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020 *! -----------------------------------------------------------------------------**
00021 *!  $Log: init347.php,v $
00022 *!  Revision 1.1.1.1  2008/11/27 20:04:03  elphel
00023 *!
00024 *!
00025 *!  Revision 1.1  2007/12/06 19:02:50  elphel
00026 *!  collected most of the camera PHP script into one  /packages/web/353/php_top directory
00027 *!
00028 *!  Revision 1.2  2007/10/12 23:00:45  elphel
00029 *!  adding power347.php to control power supplies and power timeout (supporting new FPGA interface)
00030 *!
00031 *!  Revision 1.1.1.1  2007/10/10 06:09:44  elphel
00032 *!  This is a fresh tree based on elphel353-2.10
00033 *!
00034 */
00035 
00036 
00037 //slow version of functions - they will reopen i2c for each word
00038 function send347($register_address,$d0=0,$d1=-1,$d2=-1,$d3=-1,$d4=-1,$d5=-1,$d6=-1,$d7=-1) {
00039    $i2c  = fopen('/dev/xi2c16', 'w');
00040    fseek ($i2c, 0x2000+2*$register_address) ; //Micron sensor slave 0xba
00041    fwrite($i2c, chr (floor($d0/256)).chr ($d0-256*floor($d0/256)));
00042    if ($d1>=0) {
00043     fwrite($i2c, chr (floor($d1/256)).chr ($d1-256*floor($d1/256)));
00044     if ($d2>=0) {
00045      fwrite($i2c, chr (floor($d2/256)).chr ($d2-256*floor($d2/256)));
00046      if ($d3>=0) {
00047       fwrite($i2c, chr (floor($d3/256)).chr ($d3-256*floor($d3/256)));
00048       if ($d4>=0) {
00049        fwrite($i2c, chr (floor($d4/256)).chr ($d4-256*floor($d4/256)));
00050        if ($d5>=0) {
00051         fwrite($i2c, chr (floor($d5/256)).chr ($d5-256*floor($d5/256)));
00052         if ($d6>=0) {
00053          fwrite($i2c, chr (floor($d6/256)).chr ($d6-256*floor($d6/256)));
00054          if ($d7>=0) {
00055           fwrite($i2c, chr (floor($d7/256)).chr ($d7-256*floor($d7/256)));
00056          }
00057         }
00058        }
00059       }
00060      }
00061     }
00062    }
00063    fclose($i2c);
00064 }
00065 
00066 function receive347($register_address) { // very slow?
00067    $i2c  = fopen('/dev/xi2c16', 'r');
00068    fseek ($i2c, 0x2000+2*$register_address) ; //Micron sensor slave 0xba
00069    $data = fread($i2c, 2);
00070    fclose($i2c);
00071    $v=unpack('n1',$data);
00072    print_r($v);
00073 //   printf("date is %d(0x%x)\n",$v,$v);
00074 //   echo ord($data[0])+ord($data[1]);
00075 //   echo "<br/>\n";
00076 //   return ord($data[0])+ord($data[1]);
00077    return $v[1];
00078 }
00079 
00080 function i2cread16 ($start,$length=256) {
00081    $i2c  = fopen('/dev/xi2c16', 'r');
00082    fseek ($i2c, 2*$start) ; // 16-bit registers
00083    $data = fread($i2c, 2*$length);
00084    fclose($i2c);
00085    $regs=unpack('n*',$data);
00086 //   print_r($regs);
00087    echo "<table>\n";
00088    for ($i=0; $i<$length; $i+=16){
00089      printf("<tr><td>%x</td>",$i);
00090      for ($j=1; $j<17; $j++){
00091        printf("<td>%x</td>",$regs[$i+$j]);
00092      }
00093      echo "</tr>\n";
00094    }
00095    echo "</table>\n";
00096 }
00097 
00098 
00099 
00100 send347 (0xa0,0x1234, 0x5678, 0x9, 0xabcd); // time - just testing  registers
00101 
00102 send347 (0x10,0x0);// turn analog power off
00103 
00104 send347 (0x08,0x32);     // set JPEG quality (this location has no effect in FPGA - used just as a memory)
00105 send347 (0x0a,0x0);      // turn off monochrome mode
00106 send347 (0x0c,0x64);     // set gamma = 1.0 (100 decimal, 0x64)
00107 send347 (0x04,1,1);      // set "parameters changed", so the first image request will set parameters to those from CCD
00108 send347 (0x2c,0x0);      // turn DAC LD off (changes will take effects later when it will be reenabled)
00109 send347 (0x28,0x4, 0xf); //write DAC control registers
00110 // now set analog voltages (may need individual ajustments)
00111 send347 (0x20,0x780); // Vsub +11.3V
00112 send347 (0x21,0x680); // Vog -2.5V
00113 send347 (0x22,0xec0); // Vrd 11 V
00114 send347 (0x23,0xb80); // Vdd +15V
00115 send347 (0x24,0x180); // Vh1lh +1.0V
00116 send347 (0x25,0x180); // Vh1h +1.0V
00117 send347 (0x26,0xa00); // Vh2l -4.0V
00118 send347 (0x27,0x8c0); // Vrgl -3.5V
00119 send347 (0x2d,0x0);   // Enable updating of analog outputs (CLD on)
00120 // Other DACs that control horizontal phases amplitudes (7 bits)
00121 send347 (0x30,0x50); // RG  (5V)
00122 send347 (0x31,0x42); // H1  (5V)
00123 send347 (0x32,0x78); // H1L (8V)
00124 send347 (0x33,0x3c); // H2  (5V)
00125 
00126 // data to dac2900 to set the vertical phases levels (dynamic), 10 bits
00127 //prototype board - bit 8 floating, connecting to bit0
00128 //send347 (0x40,0x226, 0x340); // 0: V1M=0V, V2L=-9V
00129 //send347 (0x42,0x340, 0x226); // 1: V1L=-9V, V2M=0V
00130 //send347 (0x44,0x226, 0x226); // 2: V1M=0V, V2M=0V
00131 //send347 (0x46,0x340, 0x0c0); // 3: V1L=-9V, V2H=8V
00132 //send347 (0x48,0x340, 0x340); // 4: V1L=-9V, V2L=-9V
00133 //send347 (0x4a,0x226, 0x3ff); // # 5: V1M=0V, V2A=-14V
00134 //send347 (0x4c,0x3ff, 0x226); // 6: V1A=-14V, V2M=0V
00135 //send347 (0x4e,0x226, 0x340); // 7: V1M=0V, V2L=-9V
00136 send347 (0x40,0x226, 0x341); // 0: V1M=0V, V2L=-9V
00137 send347 (0x42,0x341, 0x226); // 1: V1L=-9V, V2M=0V
00138 send347 (0x44,0x226, 0x226); // 2: V1M=0V, V2M=0V
00139 send347 (0x46,0x341, 0x0c0); // 3: V1L=-9V, V2H=8V
00140 send347 (0x48,0x341, 0x341); // 4: V1L=-9V, V2L=-9V
00141 send347 (0x4a,0x226, 0x3ff); // # 5: V1M=0V, V2A=-14V
00142 send347 (0x4c,0x3ff, 0x226); // 6: V1A=-14V, V2M=0V
00143 send347 (0x4e,0x226, 0x341); // 7: V1M=0V, V2L=-9V
00144 // end of analog settings
00145 # substracts (14 bits to be subtracted from the ADC outputs (one for each color, for each of 2 outputs)
00146 send347 (0x50, 0, 0, 0, 0); // Output 1: B G G R
00147 send347 (0x54, 0, 0, 0, 0); // Output 2: G B R G
00148 // Individual gains for the channels (same sequence as subtracts), 16 bits, 1000 being unity gain (all 14 bits of ADC are used)
00149 // It is not the case, as the ADC range is wider then the CCD can provide,so the values should be definitely bigger than 1000
00150 //send347 (0x58, 0x1b58, 0x1964, 0x1964, 0x2af8); // Output 1: B G G R
00151 //send347 (0x5c, 0x1964, 0x1b58, 0x2af8, 0x1964); // Output 2: G B R G
00152 
00153 send347 (0x58, 0x1964, 0x1b58, 0x2af8, 0x1964); // Output 2: G B R G
00154 send347 (0x5c, 0x1b58, 0x1964, 0x1964, 0x2af8); // Output 1: B G G R
00155 
00156 
00157 
00158 
00159 send347 (0x6c, 0, 0);       // (0x600,0x600) compensate bandwidth (needed for 25MHz only) Adds a fraction of the previous pixel to the current one
00160 #Output windows positions (master, slave) in the following sequence: ((top-1)/(height+1)/(left-1)/(width-1))
00161 //send347 (0x60, 0xf,  0xa73, 0x14, 0x7e1); // 18x18 tiles)
00162   send347 (0x60, 0xf,  0xa75, 0x12, 0xfe1); // full 20x20 ?
00163 //  send347 (0x60, 0xf,  0xa75, 0x13, 0xfe1); // full 20x20 ?
00164 //send347 (0x60, 0xf,  0xa75, 0x14, 0xfe1); // full 20x20 ?
00165 
00166 //send347 (0x60, 0x10, 0xa71, 0x1f, 0xfdf); // full frame to master (18x18 tiles)
00167 send347 (0x64, 0x0f, 0xa73, 0x7f4, 0x7e1); # 18x18 tiles
00168 send347 (0x68, 0x7f6); // half of the full line (even, lsb - shift)
00169 
00170 # Timing of horizontal phase signals and CDS/ADC
00171 //new - phase shift, ~50% duty cycle
00172 //send347 (0x6e, 0x3c1e, 0x0); // clk_itf (~clk2x) phase 0
00173 send347 (0x6e, 0x783c, 0x0); // clk_itf (~clk2x) phase 40
00174 //send347 (0x6e, 0xf078, 0x0); // clk_itf (~clk2x) phase 80
00175 //send347 (0x6e, 0xe0f0, 0x1); // clk_itf (~clk2x) phase 120
00176 //send347 (0x6e, 0xc1e0, 0x3); // clk_itf (~clk2x) phase 160
00177 //send347 (0x6e, 0x83c1, 0x3); // clk_itf (~clk2x) phase 200
00178 //send347 (0x6e, 0x0783, 0x3); // clk_itf (~clk2x) phase 240
00179 //send347 (0x6e, 0x0f07, 0x2); // clk_itf (~clk2x) phase 280
00180 //send347 (0x6e, 0x1e0f, 0x0); // clk_itf (~clk2x) phase 320
00181 # timing - period = 9cycles (72ns)
00182 send347 (0x70, 0x8); // pixel period (write one less than needed) = 9 clk (72ns). May run faster - (at 40ns), but output amplifiers can have some problems (see compensation above)
00183 
00184 send347 (0x71, 0x5);  // write PH inactive (for period ==5 should be 3, period 9 - 5)
00185 # The next 8 signals are active at the overlapping 8ns intervals, controlled by the 32 bits (starting with LSB of lower 16-bit word):
00186 # bit 0, lower word:  active ( 0- 7), bit 1 - ( 4-11), 2 - ( 8-15) ... 15 - ( 56.. 63) ns
00187 # bit 0, higher word: active (64-71), bit 1 - (68-75), 2 - (72-79) ... 15 - (120..127) ns
00188 
00189 send347 (0x72, 0x3540, 0x0); // ADCCLK 
00190 send347 (0x74, 0x500, 0x0);  // SHPA 
00191 send347 (0x76, 0x1, 0x1);    // SHDA
00192 send347 (0x78, 0x500, 0x0);  // SHPB
00193 send347 (0x7a, 0x1, 0x1);    // SHDB
00194 send347 (0x7c, 0x3540, 0x0); // clk_adc
00195 send347 (0x7e, 0x2010, 0x0); // clk2x
00196 //send347 (0x80, 0x800, 0x63, 0x9); //(0x4e1c, 0x63, 0x9) ffff ffff ffffkeep-alive and on/off delays 20.0sec, 0.1 sec, 0.01 sec
00197 //send347 (0x80, 0x1000, 0x63, 0x9); //(0x4e1c, 0x63, 0x9) ffff ffff ffffkeep-alive and on/off delays 20.0sec, 0.1 sec, 0.01 sec
00198 send347 (0x80, 0x4e1c, 0x63, 0x9); //(0x4e1c, 0x63, 0x9) ffff ffff ffffkeep-alive and on/off delays 20.0sec, 0.1 sec, 0.01 sec
00199 
00200 send347 (0x84, 25000,24999,250, 20000); //PWM control - period=25000, starting from 24999, decrementing by 250
00201                                         // until 20000
00202 //send347 (0x16, 0x1);         // make fan run only when the analog power is on (2 - always, 0 - never)
00203 send347 (0x16, 0x8);         // Alternating sequences (0x0 - "old" sequence, no alternating). Fan should be disabled - it is used for triggering other cameras
00204 
00205 // - sequencer
00206 # Sequencer program  (add miniassembler later?)
00207 $LOOP=      0x0000;
00208 $ELOOP=     0x1000;
00209 $JUMPOUT=   0x1400;
00210 $JUMP=      0x1800;
00211 $CJUMP=     0x1c00;
00212 $RESET=     0x2000;
00213 $TGLEXPOS=  0x3000;
00214 $TGLFRAME=  0x4000;
00215 $TGLLINE=   0x5000;
00216 $TGLFD=     0x6000;
00217 $TGLSHUTTER=0x7000;
00218 $VPH0=      0x8000;
00219 $VPH1=      0x9000;
00220 $VPH2=      0xa000;
00221 $VPH3=      0xb000;
00222 $VPH4=      0xc000;
00223 $VPH5=      0xd000;
00224 $VPH6=      0xe000;
00225 $VPH7=      0xf000;
00226 
00227 $NLINES=0xaa0; // 2720;
00228 $NPIX=  0x7f8; // 2040; // total pixels in a half-line (with black ones)
00229 
00230 //$T_HD=  0x064; // 100;   //  4.0 us (3.0/3.5/10.0), HCCD delay
00231 //$T_VCCD=0x064; // 100;   //  4.0 us (3.0/3.5/20.0), VCCD transfer time
00232 //$T_V3RD=0x0fa; // 250;   // 10.0 us (8.0/10.0/15.0), Photodiode transfer time
00233 //$T_V3P= 0x5dc; // 1500;   // 60.0 us (50.0/60.0/80.0), Photodiode transfer time
00234 //$T_V3D= 0x1f4; // 500;   // 20.0 us (15.0/20.0/80.0), VCCD delay
00235 //$T_S=   0x07d; // 125;   //  5.0 us (3.0/4.0/10.0), Shutter pulse time
00236 //$T_SD=  0x032; //  50;   //  2.0 us (1.0/1.5/10.0), Shutter delay time
00237 //$T_FD=  0x019; // 25;   //  1.0 us (0.5/?/?) Fast Dump Gate delay
00238 //$T_SFD= 0x9c4; // 2500;   //100.0 us (slow "fast dump") to reduce power
00239 //$T_MS=  0x07d; // 125;   //  5.0 us - rather arbitrary - mechanical shutter trigger duration
00240 
00241 //for clock= 125MHz/9:
00242 $T_HD=   55;    //  4.0 us (3.0/3.5/10.0), HCCD delay
00243 $T_VCCD= 55;    //  4.0 us (3.0/3.5/20.0), VCCD transfer time
00244 $T_V3RD= 139;   // 10.0 us (8.0/10.0/15.0), Photodiode transfer time
00245 $T_V3P=  833;   // 60.0 us (50.0/60.0/80.0), Photodiode transfer time
00246 $T_V3D=  278;   // 20.0 us (15.0/20.0/80.0), VCCD delay
00247 $T_S=     70;   //  5.0 us (3.0/4.0/10.0), Shutter pulse time
00248 $T_SD=    28;   //  2.0 us (1.0/1.5/10.0), Shutter delay time
00249 $T_FD=    14;   //  1.0 us (0.5/?/?) Fast Dump Gate delay
00250 $T_SFD= 1389;   //100.0 us (slow "fast dump") to reduce power
00251 $T_MS=    70;   //  5.0 us - rather arbitrary - mechanical shutter trigger duration
00252 
00253 
00254 
00255 
00256 # first erase after power on (~10000 lines?)
00257 send347 (0x100,$RESET             ); // reset toggle values
00258 send347 (0x101,$RESET             ); // just nop
00259 send347 (0x102,$VPH0+$T_FD         );  // V1M, V2L
00260 send347 (0x103,$TGLFD+$T_FD        ); // turn fast dump on
00261 send347 (0x104,$LOOP+0x18          );  // outer loop - 0x10 times. With first CCD 0x0a seems to be a thereshold value
00262  send347 (0x105,$LOOP+0x3e8       );  // inner loop - 1000 times
00263   send347 (0x106,$VPH1+$T_VCCD     );  // V1L, V2M
00264 
00265   send347 (0x107,$VPH0+$T_HD       );  // V1M, V2L (*8064)
00266 # Seems that 5400 is optimal (lower values - horizontal will take more time to flash)
00267 # Increase that value to 5800 to lower power consumption if the camera resets itself when turning on analog power
00268 # Other place to reduce power stress - increase power-on delay (address 0x81)
00269 //  send347 (0x108,$TGLLINE+0x100   );  // PH1, PH2 on //ajust to flashing, adjust time to power not too high
00270 // 0x100 - too low, 0x400 - enough, maybe inbetween is fine too
00271   send347 (0x108,$TGLLINE+0x400   );  // PH1, PH2 on //ajust to flashing, adjust time to power not too high
00272   send347 (0x109,$TGLLINE+$T_HD    );  // PH1, PH2 off.
00273 
00274 
00275  send347 (0x10a,$ELOOP            );
00276 send347 (0x10b,$ELOOP             );
00277 send347 (0x10c,$TGLFD+$T_HD       ); // turn fast dump off
00278            # Here starts the main loop:
00279 send347 (0x10d,$LOOP              );  // loop forever
00280  send347 (0x10e,$RESET            );  // reset toggle values
00281  send347 (0x10f,$VPH0+$T_FD       );  // V1M, V2L
00282  send347 (0x110,$TGLFD+$T_FD      );  // turn fast dump on
00283  send347 (0x111,$LOOP             );  // forever until start
00284   send347 (0x112,$VPH1+$T_VCCD    );  // V1L, V2M
00285   send347 (0x113,$CJUMP+0x19      );  //LABEL1
00286   send347 (0x114,$VPH0+$T_SFD     );  // V1M, V2L, slow
00287            # here - add faster reaction to the interrupt
00288   send347 (0x115,$TGLLINE+10      );  // PH1, PH2 on //flash just a little of horizontal register with each line
00289   send347 (0x116,$TGLLINE+$T_HD   );  // PH1, PH2 off.
00290 
00291   send347 (0x117,$CJUMP+0x1a      );  //LABEL2
00292  send347 (0x118,$ELOOP            );
00293  send347 (0x119,$VPH0+$T_FD       );  // V1M, V2L, LABEL1
00294            # inserting mechanical shutter
00295  send347 (0x11a,$TGLSHUTTER+$T_MS );  // turn mechanical shutter pulse on (5usec)
00296  send347 (0x11b,$TGLSHUTTER       );      // turn mechanical shutter pulse off
00297  send347 (0x11c,$LOOP+51          );  // shutter delay *** external address **** (2715 cycles, 108.6usec) (1 cycle = 0.1955msec)
00298   send347 (0x11d,$VPH1+$T_VCCD    );  // V1L, V2M  - 100 cycles (4usec)
00299   send347 (0x11e,$VPH0+$T_SFD     );  // V1M, V2L, slow - 2500 (100usec)
00300   send347 (0x11f,$TGLLINE+10      );  // PH1, PH2 on  10 cyc - 0.4 usec//flash just a little of horizontal register with each line
00301   send347 (0x120,$TGLLINE+$T_HD   );  // PH1, PH2 off. 100 cyc - 4 sec
00302  send347 (0x121,$ELOOP            );  // end of shutter delay
00303            # continue with old code.
00304  send347 (0x122,$TGLFD+$T_HD      );  // turn fast dump off (label2)
00305  send347 (0x123,$TGLSHUTTER+$T_S  );  // turn shutter on
00306  send347 (0x124,$TGLEXPOS         );  // turn exposure on
00307  send347 (0x125,$TGLSHUTTER+$T_SD );  // turn shutter off
00308 
00309 // send347 (0x126,$LOOP+1          );  //exposure, outer loop ***************
00310 //  send347 (0x127,$LOOP+5          );  //new - inner loop
00311 //   send347 (0x128,$VPH0+0x400     );  //exposure - step duration 2499=100usec for 25 MHz, update (*9/5)
00312 //  send347 (0x129,$ELOOP           ); 
00313 // send347 (0x12a,$ELOOP            );
00314 
00315 
00316 
00317  send347 (0x126,$LOOP+100         );  //exposure, outer loop ***************
00318   send347 (0x127,$LOOP+10         );  // inner loop - with 10 us step it can be up to 40.95 usec. Change it if you need longer exposures
00319    send347 (0x128,$VPH0+0x8a      );  //exposure - step duration 139=10.008us for 125MHz/9
00320   send347 (0x129,$ELOOP           ); 
00321  send347 (0x12a,$ELOOP            );
00322 
00323  send347 (0x12b,$VPH2+$T_V3P      );  // V1M, V2M
00324  send347 (0x12c,$VPH3+$T_V3RD     );  // V1L, V2H
00325  send347 (0x12d,$TGLEXPOS         );  // turn exposure off
00326  send347 (0x12e,$VPH2+$T_V3D      );  // V1M, V2M
00327  send347 (0x12f,$VPH0+$T_VCCD     );  // V1M, V2L, different delay
00328  send347 (0x130,$TGLFRAME         );  // turn frame on
00329  send347 (0x131,$LOOP+$NLINES     );  // shift out frame - try extra lines **
00330   send347 (0x132,$VPH1+$T_VCCD    );  // V1L, V2M (*9064)
00331   send347 (0x133,$VPH0+$T_HD      );  // V1M, V2L (*8064)
00332   send347 (0x134,$TGLLINE+$NPIX   );  // PH1, PH2 on
00333   send347 (0x135,$TGLLINE+$T_HD   );  // PH1, PH2 off. Not sure in timing (*5064?)
00334  send347 (0x136,$ELOOP            );
00335  send347 (0x137,$TGLFRAME         );  // turn frame off
00336 send347 (0x138,$ELOOP             );   // end outer (forever) loop - restart acquisition
00337 // adding labels list
00338 
00339 send347 (0x1ff,0x126              );   // address of exposure setting
00340 send347 (0x1fe,0x11c              );   // address of mechanical shutter delay
00341 
00342 
00343 # End of sequencer program
00344 
00347 //send347 (0x11, 0x0);               //  pre-enable power (will go on after the request)
00348 //send347 (0x11, 0x0);               //  pre-enable power (will go on after the request)
00350 send347 (0x10, 0xf);   //  pre-enable power (will go on after the request), enable shutter
00351 
00352 send347 (0xa0,0x1234);
00353 send347 (0xa1,0x5678);
00354 send347 (0xa2,0x9);
00355 send347 (0xa3,0xabcd);
00356 send347 (0xa5);
00357 /*
00358 program shutter default sequence (if not programmed yet)
00359 001200: 43d0 9020 5315 9001 43d0 9800    0
00360 001280: 43d0 9200 5315 9001 43d0 9080    0
00361 */
00362 
00363    $i2c  = fopen('/dev/xi2c16', 'r');
00364    fseek ($i2c, 2*0x1200) ; // 16-bit registers
00365    $data = fread($i2c, 2);
00366    fclose($i2c);
00367    $regs=unpack('n*',$data);
00368 //echo "<pre>";
00369 //print_r ($regs);
00370 //echo "</pre>";
00371    if ($regs[1]==0) {
00372     printf("<p>Mechanical shutter sequence blank - initializing to default one.</p>\n");
00373     send347 (0x200,0x43d0,0x9020,0x5315,0x9001,0x43d0,0x9800,0x0);
00374     send347 (0x280,0x43d0,0x9200,0x5315,0x9001,0x43d0,0x9080,0x0);
00375    } else {
00376     printf("<p>Mechanical shutter sequence already initialized.</p>\n");
00377    }
00378 
00379 //i2cread16(0x1000);
00380 i2cread16(0x1000,0x300);
00381 // for ($i=0;$i<16;$i++) printf("%x",receive347(0xb0+$i));printf("<br/>\n");
00382 //send347 (0xa5); for ($i=0;$i<16;$i++) printf("%x",receive347($i));printf("<br/>\n");
00383 //send347 (0xa5); for ($i=0;$i<16;$i++) printf("%x",receive347($i));printf("<br/>\n");
00384 //send347 (0xa5); for ($i=0;$i<16;$i++) printf("%x",receive347($i));printf("<br/>\n");
00385 //send347 (0xa5); for ($i=0;$i<16;$i++) printf("%x",receive347($i));printf("<br/>\n");
00386 //send347 (0xa5); for ($i=0;$i<16;$i++) printf("%x",receive347($i));printf("<br/>\n");
00387 ?>

Generated on Fri Nov 28 00:06:24 2008 for elphel by  doxygen 1.5.1