About reading CY8C9540 Expander Device ID register

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

cross mob
aemiroglu
Level 1
Level 1
5 sign-ins First reply posted First question asked

I am trying to read Device ID register data by making i2c communication with STM32 from the CY8C9540 expander sensor I have.  While reading the Device ID 0x2e register address, I am reading wrong data and I could not find much while examining what I can do about this situation.

 

I connected the AO pin directly to VSS pin. To do strong pull down.

XRES pin connected to GND.

VSS pin connected to GND.

WD pin connected to GND. (I left selectable. It can also be drawn to 5V.)

XRES pin floating. Could this pin be causing the problem.

Is it a problem not to throw a resistor while doing a strong pull down of the A0 pin?

 

I am open to your suggestions.

 

0 Likes
1 Solution
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello @aemiroglu ,

Address 0x20 is correct. Are you getting an ACK from the slave after sending 0x2E register address? If the hardware connections and the devices are OK, you should get the correct ID.

Best regards,

Sampath

View solution in original post

0 Likes
6 Replies
Gautami_12
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @aemiroglu ,

"CY8C9540 expander sensor"

Which sensor are you using?

Please go through the thread.

Warm Regards,
Gautami J

0 Likes
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello @aemiroglu ,

What address are you using for slave?

Best regards,

Sampath

0 Likes

Hello,

Thank you for your return. Since the A0 pin is strong pull down, that is, GND is made with the VSS pin, the slave address I use is 0x20.

0 Likes
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello @aemiroglu ,

Address 0x20 is correct. Are you getting an ACK from the slave after sending 0x2E register address? If the hardware connections and the devices are OK, you should get the correct ID.

Best regards,

Sampath

0 Likes
aemiroglu
Level 1
Level 1
5 sign-ins First reply posted First question asked

Problem solved, thank you for everything @SampathS_11 

0 Likes