4.2.2
Ansteuerung der Optokoppler I/O
Beispiel : Einlesen der Eingänge mit der QLIB unter C
#include <stdio.h>
void main()
{
unsigned int port;
int i;
long int j;
unsigned int wert;
port = 0x1d0;
while(!kbhit()) {
for( i = 0; i < 16; ++i ) {
wert=1<<i;
for(j=0;j!=200000;++j);
printf("%x %x \n",inp(port+4),inp(port+5));
}
}
}
Seite 16
Programmierung über Direkt I/O
Produktbeschreibung