Hi,
I am using the following code to read from device. It reads the specified data. But the clock still toggles until I stop it with "DIG_Out_Prt (ANALOGBOARD, PORTA, 0x00);". This puts my device in other mode. So, I want to toggle the clock only specified number of times. How can I do that?
Thanks a lot,
Kiran.
DIG_Grp_Config(DIOBOARD, 2, 1, 2, 0);
DIG_Out_Prt (ANALOGBOARD, PORTA, 0x00);
status = DIG_Grp_Mode (DIOBOARD, 2, 3, 0, 0, 0, freq);
status = Align_DMA_Buffer(DIOBOARD, 12, buf, numbytes, numbytes, &ulAlignIndex);
// Ready to acquire, waiting for trigger
status=DIG_Block_In(DIOBOARD, 2, buf, numbytes);
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Start Burst Trigger Here
//!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DIG_Out_Prt (ANALOGBOARD, PORTA, 0x0F);
;
count = 0;
maxcount=100*numbytes;
while ((ulRemaining != 0) && (status == 0) && (count++ {
status = DIG_Block_Check(DIOBOARD, 2, &ulRemaining);
if ((count>(maxcount/10)) && (ulRemaining==numbytes))
count=maxcount;
}
if (count>=maxcount)
{
MessagePopup ("Time Out Error!!!", "Ready Busy Signal may have a problem");
DIG_Block_Clear (DIOBOARD, 2);
DIG_Grp_Config(DIOBOARD, 2, 0, 0, 0);
DIG_Out_Prt (ANALOGBOARD, PORTA, 0x00);
return FAIL;
}
DIG_Grp_Config(DIOBOARD, 2, 0, 0, 0);
DIG_Out_Prt (ANALOGBOARD, PORTA, 0x00);