Skip to content

PCA9685 configured to take i2c commands from all addresses. #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ScottMonaghan opened this issue Jul 22, 2020 · 1 comment · Fixed by #32
Closed

PCA9685 configured to take i2c commands from all addresses. #31

ScottMonaghan opened this issue Jul 22, 2020 · 1 comment · Fixed by #32
Labels

Comments

@ScottMonaghan
Copy link
Contributor

ScottMonaghan commented Jul 22, 2020

I'm combining my PCA9685 with HT16K33 8x8 matrix.
As soon as I send a command to the HT1633 the PCA stops responding and all my connected servos go limp.

The solution for this issue was identified here: rwaldron/johnny-five#1591 (comment)

It appears the issue was fixed in the arduino library but not corrected in circuit python (see adafruit/Adafruit-PWM-Servo-Driver-Library@9f8e1dd#diff-5d1e3a5213c0ef6dedb2baf5cc323727L106-R110)

I confirmed the fix below works for me:
Change line 163 of adafruit_pca9685 in frequency(self, freq) from
self.mode1_reg = old_mode | 0xa1 # Mode 1, autoincrement on
to
self.mode1_reg = old_mode | 0xa0 # Mode 1, autoincrement on, fix to stop pca9685 from accepting commands at all addresses

I will submit a pull request with this change.

@ScottMonaghan
Copy link
Contributor Author

Pull request here: #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants