PCA8885 example code to set up and read

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PCA8885 example code to set up and read

1,788件の閲覧回数
support2
Contributor I

I am new to Touch sensors and I2C comms. I have PCA8885 and the Port Extender PCA9535. This is part of a University course.

Is there example code that I can see that shows me how to communicate with these devices to set them up for use and then to read the SENS register. One device has an address of 0x20 thats fine, but does the registers have an address or an offset???? The Datasheet is not clear on that.

Thanks and regards

Paul

0 件の賞賛
返信
2 返答(返信)

1,616件の閲覧回数
reyes
NXP TechSupport
NXP TechSupport

Hi Paul,

Unfortunately, there are no standalone drivers or example codes specifically for the PCA8885, however, you can find an example code for the MPC5748G (MCU) in which is included a PCF8885 Touch sensing demo and PCA9535 demo. So I think it can be useful as a reference for your application, please download the “Example_MPC5748G_PCF8885-Touch_sensing_demo-v1_0-GHS614.zip” file from the following link: https://community.nxp.com/docs/DOC-339375

 

Then go to source folder and open the main.c file. In this fil you can find the example code for the PCF8885 and the PCA9535.

 

The PCF8885 supports direct reading of the sensor state from the SENS register. If - after sending the address - the R/W bit is immediately set to logic 1 without sending a command, the circuit recognizes that it must immediately return the content of the SENS register. When the transaction, after reading the SENS register, is not terminated with a STOP bit, the PCF8885 repeatedly sends the content of SENS again.


Have a great day,

Jose
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,616件の閲覧回数
support2
Contributor I

Jose, thank you very much for your assistance. I will follow your advice.

0 件の賞賛
返信