PCA9502 read back gpio using spi not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PCA9502 read back gpio using spi not working

769 Views
subrahmanyapere
Contributor I

pastedImage_1.png

i am trying to do a read back  of gpio lines using spi and it is not working.I have attached the spi commands i am sending.Please let me know what i am doing wrong .

pastedImage_2.png

Tags (2)
0 Kudos
3 Replies

631 Views
subrahmanyapere
Contributor I

I am still having the same issue can you please help me fix this .I just want to read the gpio ports  and these are the spi transactions i send 

pastedImage_1.png

0 Kudos

631 Views
reyes
NXP TechSupport
NXP TechSupport

Hi,

The usual steps on the master side for writing are:

* Configure desired speed within slave spec

* Assert SS/CS

* Send write command

* Start sending data/Ignore incoming data

* Stop by de-asserting SS/CS

 SPI write.png

The usual steps on the master side for reading are:

* Configure desired speed within slave spec

* Assert SS/CS

* Send read command

* Send dummy data/received data

* Stop by de-asserting SS/CS

 SPI read.png

In the image you sent I cannot see the SS/CS configuration unless is the “SPI EN” signal in which case is not doing what it supposed to do.

Regards,

Jose

NXP Semiconductor

0 Kudos

631 Views
subrahmanyapere
Contributor I

pastedImage_1.png

i still have the same problem.you can see my spi enable line goes low during the transaction .but my miso line returns ff.

I write to reg A abd read on reg B.

0 Kudos