资源预览内容
第1页 / 共52页
第2页 / 共52页
第3页 / 共52页
第4页 / 共52页
第5页 / 共52页
第6页 / 共52页
第7页 / 共52页
第8页 / 共52页
第9页 / 共52页
第10页 / 共52页
亲,该文档总共52页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
Test and Measurement Circuits Test and Measurement Circuits ? !“ ? !“#$% /? ! qh=char_code0-0xa0; wh=char_code1-0xa0; offset=(94*(qh-1)+(wh-1)*32L; / ? ? !“#$% seek(hzk_f,offset,SEEK_SET); read(hzp_f,byte,char_len); / ? for(i-0; i=char_len; i+) / ? ! ? !“ 32 ? fprintf(fzk, “FCB“); / MC68HC? ? !“#$% / MC68HC? ? !“#$ fprintf(fzk, “%xn“,bytei); / ? ! (? !“)? !“# ? ! ? !“#$%A/D ? ? !“#$%? !“#$%? ?!“#$%? ? ?0? !?0? ? !“#$% ? !(BER)? !“#BER ? !“ ? !“#$?% !? !“#$?0? ? ? !“#$%? !? !“#$?1? !“ ? ?0? ? ? !“#$%? SONET? !“#$%! Read (int,char); char *datapointer = store; char storeNUM_SAMPLES*MAX_REG_LENGTH + 30; void main() char a; DDRC = 0x04; PORTC | = 0x04; /* make the /CS line high */ Writetoreg(0x20); /* Active Channel is Ain1(+)/Ain1(- ), next operation as write to the clock register */ Writetoreg(0x06); /* master clock enabled, set output rate */ Writetoreg(0x10); /* Active Channel is Ain1(+)/Ain1(- ), next operation as write to the setup register */ Writetoreg(0x7e); /* gain = 128, bipolar mode, buffer off, clear FSYNC and perform a Self Calibration*/ while(PORTC /* wait for /DRDY to go low */ for(a=0;aNUM_SAMPLES;a+); Writetoreg(0x38); /*set the next operation for 16 bit read from the data register*/ Read(NUM_SAMPES,2); Writetoreg(int byteword); int q; SPCR = 0x3f; SPCR = 0X7f; /* this sets the WiredOR mode (DWOM=1), Master mode(MSTR=1), SCK idles high(CPOL=1) */ DDRD = 0x18; /* SCK, MOSI outputs */ q = SPDR; /* read the staus register and the data register to clear the interrupt */ PORTC /* /CS is low */ SPDR = byteword; /* put the byte into data register */ while(!(SPSR /* wait for /DRDY to go low */ PORTC |= 0x4; /* /CS high */ Read(int amount, int reglength) int q; SPCR = 0x3f; SPCR = 0x7f; /* clear the interupt */ DDRD = 0x10; /* MOSI output, MISO input, SCK output */ while(PORTC /* wait for /DRDY to go low */ PORTC /* /CS is low */ for(b=0;breglength;b+) SPDR = 0; while(!(SPSR /* wait until port ready before reading */ *datapointer+=SPDR; /* read SPDR into store array via datapointer */ PORTC|=4; /* /CS is high */ ? AD7706? !“#$% ? ! DSP;?;? ? !“#$ F206?8253? !“# ?F206? ! “#$%? !“# OUTBM1.SET 300H;? ! PHASEH.SET 301H; ? !“!#$% ? !“!#$% ? !“#$% ? !“#$%8253? ;F206? ! LDP #6;? !“ 6 ? SPLK #0FH,OUTBM1 OUT OUTBM1,ASPCR;IO0-IO3? !“#$% SPLK #0249H,OUTBM1 OUT OUTBM1,WSGR;1? !“ ; 8253? !0? !1?0 LOOP: SPLK #011B,OUTBM1 ; D-Q?0,A1,A0=11, ? 8253? OUT OUTBM1,IOSR;D-Q?0? I08253 A1 A0 ;IO2 IO1 IO0 ;(0:? 0) (? !“) SPLK #00010000B,OUTBM1 OUT OUTBM1,IO8253;? ! 0 ? 0, ? ? !“#,2? ! SPLK #01010000B,OUTBM1 OUT OUTBM1,IO8253;? !1? 0,? ? !,2? ! SPLK #000B,OUTBM1 OUT OUTBM1,IOSR;D-Q?0,A1,A0=00, 8253? ?3 ? ?! 6.02003.1.6, 9:52 PM261 ” 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567 12345678901234567890123456789012123456789012345678901234567890121234567890123456789012345678901212345678901234567890123456
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号