
PCI-D96SU/D128SU Card
User Manual, Ver. 1.0, Apr. 2019, PMH-031-10 Page 13
dwDataCount = 512
//Write DO Pattern data
for(dwIndex = 0; dwIndex< dwDataCount ; +)
{
mem4g_write_dword((DWORD)(Bar1dwIndex*4),dwDOVal[dwIndex]);
}
//Check DO Pattern data
for(dwIndex = 0; dwIndex< dwDataCount ; +)
{
dwVal = mem4g_read_dword((DWORD)( Bar1dwIndex*4));
if(dwVal!=dwDOVal[dwIndex]) return PD128_SetPatternErr;
}
//Set Port2 (PC) to Output Mode
mem4g_write_dword((DWORD)(Bar00x10),0xF);
//1000000/fSamplingRate us
//Set pattern base clock 1 us * (N+2)
mem4g_write_dword((DWORD)(Bar00x54),(DWORD)(1000000.0/fSamplingRate)-2);
//Set pattern number
mem4g_write_dword((DWORD)( Bar00x58),dwDataCount-1);
//Pattern Start
mem4g_write_dword((DWORD)(Bar00x5C),0x1);
2.9
Digital Pattern Function
The PCI-D96SU/D128SU supports the digital pattern function for Port2 (PC) of Digital Output. When
the PC port is set to output mode and enabled pattern output, which is chosen in
. The
digital pattern can be continuously generated on a PC port using a user-defined pattern data (Refer
to
), pattern
number (
) and pattern base clock (Refer to
).
The following is a sample of the source code: