Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use hardware-controlled serial Digital I/O in reading

I use visa to programe.
my code as follows;

include......
include......



iBus* bus;

bus = acquireBoard(0x10931180);
tAddressSpace Bar1;
tESeries *board;
tSTC *theSTC;
int i;

initMite(bus);

Bar1 = bus->createAddressSpace(kPCI_BAR1);
board = new tESeries(Bar1);
theSTC = new tSTC(Bar1);

theSTC->DIO_Control.writeDIO_Pins_Dir(0xf7);

theSTC->Clock_and_FOUT.setSlow_Internal_Timebase(1);
theSTC->Clock_and_FOUT.setSlow_Internal_Time_Divide_By_2(1);
theSTC->Clock_and_FOUT.setClock_To_Board(1);
theSTC->Clock_and_FOUT.setClock_To_Board_Divide_By_2(1);
theSTC->Clock_and_FOUT.flush();

theSTC->Clock_and_FOUT.writeDIO_Serial_Out_Divide_By_2(1);
theSTC->DIO_Control.writeDIO_HW_Serial_Timebase(0);
theSTC->DIO_Control.writeDIO_HW_Serial_Enable(1);

if(theSTC->Joint_Status_1.getDIO_Serial_IO_In_Progress_St()==1)
{
ShowMessage("Serial IO already in Progress");
//int i=0;
}

w=theSTC->DIO_Serial_Input.readDIO_Serial_Data_In_St();

Now I can write,but I can't receive anything. There is no extstrobe/sdclk too.why?
Thank you!
0 Kudos
Message 1 of 2
(2,676 Views)
Hi bluesolyg,

It seems like you're doing Register Level Programming..is that the case? If so, you should post your question in the following thread here.

Thanks,
Lesley Y.
0 Kudos
Message 2 of 2
(2,624 Views)