/* demo 8 : Pulse Width Measure */ /* step 1 : J19 select EXTG1, J22 select CLOCL1=8M hz */ /* step 2 : connect pin20 of CON1 to pin1 of CON2 */ /* step 3 : connect external signal to (pin20,pin19) */ /* step 4 : run demo8.exe, the width of active high pulse will */ /* be shown in the screen. (8 ms max.) */ /* ----------------------------------------------------------- */ #include "PCITMC12.H" void pci_tmc12_di(WORD *wDi); WORD pci_tmc12_select8254(char cChip); WORD pci_tmc12_c0(char cConfig, char cLow, char cHigh); WORD pci_tmc12_c1(char cConfig, char cLow, char cHigh); WORD pci_tmc12_c2(char cConfig, char cLow, char cHigh); WORD wBaseAddr,wIrq,wPLX; int main() { int i,j,k; WORD wBoards,wRetVal; char c,cc[80]; unsigned int high,low,count; float ms; clrscr(); wRetVal=PTMC12_DriverInit(&wBoards); printf("\n(1) Threr are %d PCI-TMC12 Cards in this PC",wBoards); if ( wBoards==0 ) { putch(0x07); putch(0x07); putch(0x07); printf("(1) There are no PCI-TMC12 card in this PC !!!\n"); exit(0); } printf("\n(2) Show the Configuration Space of all PCI-TMC12:"); for(i=0; i