Measurement-computing Personal488 rev.3.0 For DOS & Windows 3.Xi Instrukcja Użytkownika Strona 97

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 96
8H. Turbo C II. SOFTWARE GUIDES - 8. Driver488/DRV
II-82 Personal488 Users Manual, Rev. 3.0
}
ieeewt(hello\n);
ieeerd(response);
printf(%s\n,response);
ieeewt(status\n);
ieeerd(response);
printf(%s\n,response);
ieeewt(output 16;F0R0X\n);
ieeewt(enter 16\n);
ieeescnf(%*4s%e,&voltage);
printf(The read value is %g\n,voltage);
sum=0.0;
for (i=0; i; i++) {
ieeewt(enter 16\n);
ieeescnf(%*4s%e,&voltage);
sum=sum+voltage;
}
printf(The average of 10 readings is %g\n,sum/10.0);
ieeeprtf(ENTER 16 #1700 BUFFER %d:%d\n,
segment(hundred),offset(hundred));
for (i=0; i<1700; i++) putchar(hundred[i]);
ieeeprtf(ENTER 16 #1700 BUFFER continue\n,
segment(hundred),offset(hundred));
ieeewt(status\n);
ieeerd(response);
printf(%s\n,response);
ieeewt(wait\n);
ieeewt(status\n);
ieeerd(response);
printf(%s\n,response);
ieee_cki = cklpint;
ieee_isr = isr;
ieeewt(arm srq\n);
ieeewt(output 16;M2X);
}
void isr()
{ int _false()_;
int sp;
int st195;
printf(Interrupt detected...);
ieee_cki = _false_;
ieeewt(spoll\n);
ieeescnf(%d,&sp);
if (sp==0) {
printf(Non-SRQ Interrupt!\n);
exit(1);
}
ieeewt(spoll 16\n);
ieeescnf(%d,&st195);
if ((st195 & 0x40) == 0 ) {
printf(Non-195 SRQ!\n);
exit();
}
if ((st195 & 0x20) == 0) {
if (st195 & 0x01)
printf(Overflow\n);
if (st195 & 0x02)
printf(Buffer Full\n);
if (st195 & 0x04)
printf(Buffer 1/2 Full\n);
if (st195 & 0x08)
printf(Reading Done\n);
if (st195 & 0x10)
printf(Busy\n);
} else {
if (st195 & 0x01)
printf(Illegal Command Option\n);
Przeglądanie stron 96
1 2 ... 92 93 94 95 96 97 98 99 100 101 102 ... 399 400

Komentarze do niniejszej Instrukcji

Brak uwag