PCA9745B aberrant communication

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PCA9745B aberrant communication

634 次查看
dan5
Contributor I

Hi NXP community,

I'm struggling with basic communication on a PCA9745B.  Reading MODEs 1 and 2 works fine, and I get 0 and 1 as outputs, respectively.

However, anything beyond that gets... strange.  For example, reading register 02h (LEDOUT0) after either a RESET or power down/power up gives FFh; it should be AAh, if I understand the defaults correctly.  Even stranger, writing AAh to the LEDOUT0 register followed by a read gives 0.  If I read again, with no changes, I again get FFh.  I have confirmed that all four signals (CS/SCLK/MOSI/MISO) act as they should with an oscilloscope.  

Commands look like this:

send_SPI([0b00000101,0b11111111]) #set up to read register 10
send_SPI([0b11111111,0b11111111]) #read out result

printed result: [0,FFh]


send_SPI([0b00000100,0b10101010]) #wire 10 to LED0 through LED 3
send_SPI([0b00000101,0b11111111]) #set up to read register 10
test = send_SPI([0b11111111,0b11111111])
printed result: [0,0]

send_SPI([0b00000101,0b11111111]) #set up to read register 10
test = send_SPI([0b11111111,0b11111111])
printed result: [0,FFh]

Pins:

1) R = 910Ohms (to ground)

2) gnd

3) MISO

4) CS

5) gnd

6) Green LED cathode

7) NC

8) NC

9) NC

10) gnd

11) NC

12) NC

13) NC

14) NC

15) NC

16) NC

17) NC

18) NC

19) gnd

20) NC

21) NC

22) NC

23) NC

24) gnd

25) 10k pull up resistor to +5V

26) SCLK

27) MOSI

28) +5V

 

Any ideas why this might be happening?  I'm happy to share scope readings, code, diagrams, etc. if any additional information would be useful.  Thank you in advance!

 

Cheers,

Dan

标记 (1)
0 项奖励
1 回复

572 次查看
dan5
Contributor I

I resolved my own issue.  For anyone who runs into something similar in the future, the likely culprit is a bad chip (in my case, caused by my own destruction).  I had soldered this chip to a breakout board and discovered a small amount of light coming from an LED when PWMall was 0.  It seems that I hadn't cleaned the board well enough and some flux offered a current pathway to some of the comm pins.  Unfortunately, this meant that the comm pins had been exposed to +10V (the negative side of my LEDs), and likely damaged them as this is well above their voltage tolerance.

Good luck to anyone else struggling with a similar topic!  And thanks to NXP for making this chip; the SPI integration and external reference resistor make this chip leagues ahead of others for our application.