Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hi all,

I am trying to use I2C with TCA9555.

I want to configure all TCA OUTPUT_0 to high, but it seems to be unsuccessful.

It looks like I have a problem with the source code being incorrect, can you give me some suggestions?

Thanks everyone,

 

HoiHo_0-1696670092582.png

 

HoiHo_2-1696670161399.png

 

HoiHo_3-1696670305251.png

 

 

0 Likes
1 Solution
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hello,

The resistor value is 4k7. 

Update: I have solved the problem, I can write OUTPUT and read INPUT of TCA9555

The problem is the I2C Slave Address, pay attention to the R/W bit.

R/W bit set to 0 - Write  --->> Slave ADD is 0x40
R/W bit set to 1 - Read --->> Slave ADD is 0x41

HoiHo_0-1697015238903.png

 

View solution in original post

0 Likes
6 Replies
sujatapatil
Moderator
Moderator
Moderator
10 likes received 100 sign-ins 25 solutions authored

Hi , 

As per your schematic shared I2C address is 0x00 (A0, A1, A2 are grounded). In current code you are sending data to address 0x20 . 

Please change below line ,

#define TCA9555_ADD_1 (0X00)

let me know if above solution works for you .

Thanks

Sujata

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hi Sujata,

According to the Datasheet it is 0x20,

I tried 0X20 and 0X40 and also 0X00, both failed

HoiHo_0-1696836973281.png

 

0 Likes
sujatapatil
Moderator
Moderator
Moderator
10 likes received 100 sign-ins 25 solutions authored

Hi ,

As per datasheet  correct address is 0x20 for your design. Can you please confirm clock speed at which I2c master configured . TCA device operated at 400khz . Please check master side clock configuration and if it is not same configure it to 400khz. Please update on this.

Further to above recommended configuration value,  you are still facing issue then we need to probe I2C lines to see what is going wrong.

Thanks

Sujata

 

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hi,

I tried 400khz, still problem.
I used an Oscilloscope to measure on SCL and SDA, but only saw a high signal of 3.3v.
Didn't see any pulses.

HoiHo_0-1696930567781.png

HoiHo_1-1696930584821.png

 

HoiHo_2-1696930594250.pngHoiHo_3-1696930647068.png

 

HoiHo_4-1696930678230.png

 

0 Likes
sujatapatil
Moderator
Moderator
Moderator
10 likes received 100 sign-ins 25 solutions authored

Hi , 

What is pullup register value used on SCL and SDA . Screenshot of your design says it is 43K . Can you please confirm it as this value is blur . Suggested is to use 10K .

Thanks

Sujata

0 Likes
Bale
Level 4
Level 4
5 solutions authored 25 replies posted 5 questions asked

Hello,

The resistor value is 4k7. 

Update: I have solved the problem, I can write OUTPUT and read INPUT of TCA9555

The problem is the I2C Slave Address, pay attention to the R/W bit.

R/W bit set to 0 - Write  --->> Slave ADD is 0x40
R/W bit set to 1 - Read --->> Slave ADD is 0x41

HoiHo_0-1697015238903.png

 

0 Likes