Hi,
I developed a PCB and used FDC1004 on it. My uConroller works at 5 V and as known as FDC1004 works at 3.3V. I used TXB0106 Level Shifter at SDA and SCL pins. Communication pins(SDA and SCL) pulled up to Vdd with pull-up resistors (4.7K). I dont know if i had mistake so far.
I want to read firstly Device ID. At datasheet, Figure.14 shows I2C read prochedure of FDC1004. Clearly seems it has 5 steps.
- 7 bit Serial Bus Adress Byte(Write) [0xA0]
- Pointer Register Byte [0xFF]
- 7 bit Serial Bus Adress Byte(Read) [0xA1]
- Data MSB from Slave
- Data LSB from Slave
Code Example :
I2C1_Start(); // issue I2C start signal I2C1_Wr(0xA0); // send byte via I2C (device address + W) I2C1_Wr(0xFF); // send byte (address of Device ID) I2C1_Start(); // issue I2C signal repeated start I2C1_Wr(0xA1); // send byte via I2C (device address + R) DeviceID_MSB = I2C1_Rd(1); // Read the data (Acknowledge) DeviceID_LSB = I2C1_Rd(0); // Read the data (NO acknowledge) I2C1_Stop(); // issue I2C stop signal
As result of debug, the program not passing under the line of I2C1_Wr(0xA0);. I2C clock speed is 100kHz.
Is there any mistake about my works? or what i could be miss?
Thank you so much.