The demo program to start MagicScan operation is given as follows:
WORD P180X_StartScan(WORD wSampleRate, WORD wNum)
{
WORD wVal;
WORD wRetVal;
wMagicNum=wNum;
disable_timer0();
/* Disable pacer timer first */
/* start MagicScan controller */
wRetVal=pic_control(0xD400); /* 11?1 01?? ???? ???? cmd_101=start scan */
if (wRetVal!=0) return(wVal);
/* Clear FIFO to clear all data */
outport(wAddrCtrl,0x2000); /* Bit15=0=clear FIFO, Bit13=1=not PIC cmd */
outport(wAddrCtrl,0xA000); /* Bit15=1=no reset FIFO, BIT13=1=not PIC cmd */
enable_timer0(wSampleRate); /* Enable pacer timer, sampling rate=8 M/dwSample */
magic_scan();
/* Call MagicScan subroutine(DOS) or thread(Windows) */
return(NoError);
}
z
P1202_StartScan(…) is designed for PCI-1202H/L/HU/LU
z
P1602_StartScan(…) is designed for PCI-1602 and PCI-1602F
PCI-1202/1602/1800/1802 Hardware User’s Manual
(
Ver.4.2, Dec/2009, PMH-014-42)---- 48