PCA9685 board

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

PCA9685 board

922 Views
Carlito
Contributor I

"PCA9685 16-channel, 12-bit PWM Fm+ I2C-bus LED controller" is the product I've been looking into, but I couldn't find any Python code to directly control this product. My plan is to use a USB to I2C converter cable to connect the USB port on my computer directly to the PCA9685 servo controller board. I'd like someone to assist me by providing a simple piece of code to start and stop the servo, or to provide relevant operational information.

0 Kudos
5 Replies

897 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Carlito,

unfortunately we do not use python. Usually our software is in C. Easiest for you would be to purchase OM13320 and use the software on the OM13320 product page

JozefKozon_0-1697629202336.png

Or please look in this link for a LED driver example for PCA9957HN, which is from the same family, but is 24channel and has SPI interface instead of I2C. There are also other differences.

With Best Regards,

Jozef

0 Kudos

891 Views
Carlito
Contributor I

Dear Jozef,

I hope all is well. I wanted to inquire about some aspects of the PCA9685.
I've been attempting to connect the PCA9685 board to a computer and use
Python on the computer to send commands in order to control the servos
connected to the PCA9685 board in real-time. I am interested in exploring
this field and trying to use my own code to control the PCA9685,
rather than relying on software provided by your company.

If you could provide any advice or information on how to communicate
with the PCA9685 and how to write Python code to achieve this goal,
I would greatly appreciate it.

Once again, thank you for your ongoing assistance and support.

Best regards,

Carlito

 

 

0 Kudos

885 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Carlito,

in case you want to use your own software (IDE, code), you need a Master MCU with an I2C interface, which will communicate with your PC and will load your code (set the internal registers) in the PCA9685. Please refer to the Figure 26. in the PCA9685 datasheet. 

JozefKozon_0-1697693308669.png

You also need to set the I2C address with the A0 through A5 pins, and then you need to set the correct address in your code.

JozefKozon_1-1697693406887.png

With Best Regards,

Jozef

0 Kudos

863 Views
Carlito
Contributor I

Dear Jozef,

Thank you very much for your help. I have already started working on the solution you provided.

Best regards, Carlito

0 Kudos

830 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Carlito,

you are very welcome. I wish you best with your development. 

With Best Regards,

Jozef

0 Kudos