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