ICP DAS USA PCI-1202 Series Hardware User Manual page 59

Hide thumbs Also See for PCI-1202 Series:
Table of Contents

Advertisement

3.6.1.10 Handshake Control Bit
Set the B13 to 0 if the command is sent to the MagicScan controller. Keep this bit at high
when not used.
The demo program of handshaking is given as follows:
WORD pic_control(WORD i)
{
WORD j;
if ((inport(wAddrCtrl)&0x04)==0)
{
outport(wAddrCtrl,0xffff);
}
j=0;
while ((inport(wAddrCtrl)&0x04)==0)
{
j++;
if (j>65530) return(AdControllerError); /* time out */
}
i = i & 0xDFFF;
outport(wAddrCtrl,i);
j=0;
while ((inport(wAddrCtrl)&0x04)!=0)
{
j++;
if (j>65530) return(AdControllerError); /* time out */
}
outport(wAddrCtrl,(WORD)(i | 0x2000)); /* set pic high !! */
j=0;
while ((inport(wAddrCtrl)&0x04)==0)
{
j++;
if (j>65530) return(AdControllerError); //time out
}
return(NoError);
}
PCI-1202/1602/1800/1802 Hardware User's Manual
/* send a recovery to PIC */
/* set pic low !! */
(Ver. 4.2, Dec/2009, PMH-014-42)---- 59

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents