The demo program of D/I/O is given as follows:
WORD P180X_Di(WORD *wDi)
z
P1602_Di(…) for PCI-1602
z
P1202_Di(…) for PCI-1202
{
*wDi=inport(wAddrDio)&0xffff;
return(NoError);
}
WORD P180X_Do(WORD wDo)
z
P1602_Do(…) for PCI-1602
z
P1202_Do(…) for PCI-1202
{
outport(wAddrDio,wDo);
return(NoError);
}
3.7.2 Card ID Register
The format of the Card_ID register is given as follows:
X X X X
Bit3 Bit2 Bit1 Bit0
It can read card ID set from switch (SW1)
The demo program of card ID is given as follows:
WORD P180X_ID(WORD *wDi)
{
*wID=inport(wAddrCardID)&0x000f;
return(NoError);
}
PCI-1202/1602/1800/1802 Hardware User’s Manual
(Ver. 4.2, Dec/2009, PMH-014-42)---- 63