According to the rest of the datasheet for that chip (U4091BM) it has three pins labeled INT, SCL and SDA. These are typically the names of the I2C pins, although this chip doesn't seem to speak I2C.
Rather, it just seems to use a digital signaling system similar to I2C, but without a lot of I2C's capabilities. To communicate with the chip, you'd need to "bit bang" data on a set of three GPIOs in the specific timing that the chip requires - that's what the diagrams you posted are for.
The diagrams aren't protocols, they're just bus timing diagrams that tell what communications between this chip and the micro controller running it should look like timing wise. You have to flip GPIOs on and off in the right sequence and the right timing to get this chip to recognize the signals as read/write commands.
According to the data sheet, you need to send a 12 bit word to this chip to either read or write data, with the word consisting of a four bit address and an 8 bit data word.
as erikjgreen said it is like i2c but I think it is more similar to Synchronous Serial Interface (SSI) .
the problem is timing . I use delaymicroseconds() but it doesn't work.
The timing of digitalWrite() often works out for SSI without any delays required.
If you are using direct Port commands, you might be better of with NOP's or __builtin_avr_delay_cycles ( )then trying to use delayMicroseconds().
I’m not sure about this at all, but in my experience with SSI, the digitalWrite() and digitalRead() commands time out to the 4-5 microsecond timing required. Try your code without the delays.
I also interpret the SDA strobe after the data stream slightly differently from how you did it.
void Write(byte Address, byte value)
{
uint16_t DatatoWrite = value;
DatatoWrite <<= 4;
DatatoWrite |= Address;
DatatoWrite <<= 1; //adds 0 in R/W 13th bit for write
Serial.println(Address, BIN);
Serial.println(value, BIN);
Serial.println(DatatoWrite, BIN);
for (int i = 0; i < 13; i++) {
digitalWrite(scl_pin, LOW);
if ((DatatoWrite & 0b1000000000000) == 0) {
digitalWrite(sda_pin, LOW);
}
else {
digitalWrite(sda_pin, HIGH);
}
digitalWrite(scl_pin, HIGH);
//shift data for next bit
DatatoWrite <<= 1;
DatatoWrite &= 0b1111111111111;
//delayMicroseconds(4.7);
//digitalWrite(scl_pin, HIGH);
//delayMicroseconds(4);
}
//after 13 bits strobe SDA
digitalWrite(sda_pin,HIGH);//was LOW from Write bit 0
digitalWrite(sda_pin, LOW);
//delayMicroseconds(4);
//digitalWrite(scl_pin, LOW);
digitalWrite(sda_pin, HIGH);
// delayMicroseconds(4.7);
//digitalWrite(scl_pin, HIGH);//was already HIGH after bit transfers
}
The data sheet also indicates that you need external pull ups on SDA to read data out from the chip.