Chapter 7 Digital I/ODAQ-STC Technical Reference Manual7-10 ©National Instruments Corporation7.6.2.2 Hardware-Controlled Serial Digital I/ODIO line 4 can be used for serial input, and DIO line 0 for serial output. PinEXTSTROBE/SDCLK clocks the data by generating active low pulses at the times digitaldata on line 0 is valid. If you want the DAQ-STC to input data synchronously to the mentionedclock, circuitry connected to the DIO line 4 must have valid and stable data at those times.Pulse generation on the EXTSTROBE/SDCLK pin can be controlled by hardware or bysoftware. This section presents the programming sequence for hardware-controlled pulsegeneration on the EXTSTROBE/SDCLK pin.To perform 8-bit hardware-controlled serial output on pin 0, you must program pin DIO0 foroutput (see the function DIO_Pin_Configure). To perform 8-bit, hardware-controlled serialinput on pin 4, you must program pin DIO4 for input (see the functionDIO_Pin_Configure). Also, in either case you must enable the serial timebase usingSlow_Internal_Timebase (see the function Msc_Clock_Configure in Chapter 10).Use the following function to write data to be output on the serial digital output. Use thefunction DIO_HW_Serial_Initialize to initiate the transfer.Function DIO_Serial_Data_Out{DIO_Serial_Data_Out =[ijklmnop];}Here i, j, k, l, m, n, o, and p are all binary digits, so that [ijklmnop] is an eight-digit binarynumber. Logic values corresponding to i, j, k, l, m, n, o, and p will appear on DIO0 pin. Datawill be output starting with i and ending with p; in other words, output starts with the MSBand ends with the LSB.Use the following function to enable and configure the serial I/O. This function needs to becalled only once.Function DIO_HW_Serial_Configure{DIO_Serial_Out_Divide_By_2 = 0 (do not divide by 2) or 1 (divide by 2);DIO_HW_Serial_Timebase = 0 (1.2 μs clock) or 1 (10 μs clock);DIO_HW_Serial_Enable = 1;}Use the following function to initiate a serial transfer.Function DIO_HW_Serial_Initialize{If (DIO_Serial_IO_In_Progress_St is 1) then