====== ShiftOut ====== ''ShiftOut clock, data, mode, variable, bitLength'' | //clock// | Clock port. (0 to 255) | | //data// | Data port. (0 to 255) | | //mode// |0 = LSB first (Least Significant Bit first) | |:::|1 = MSB first (Most Significant Bit first) | |:::|2 = MSB first(Most Significant Bit first) , create ACK (For I2C) | |bitLength| Length of bits (1 to 16) | This command performs a shift output. There are 3 modes. Mode 2 is for the I2C protocol. In I2C communication, an ACK signal is required for every 8 bits. ShiftOut 3,4,0,&H55,8 ' Port 3 = Clock, Port 4 = Data, Mode = 0, send 0x55,8 bits to be sent {{ :cubloc:shiftout:shiftout.png?nolink |}} [[cubloc:index#system_library:|Go CUBLOC home]]