Skip to content
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

[Bug] Software I2C example not working #20

Open
RichardWangPhD opened this issue May 1, 2022 · 1 comment
Open

[Bug] Software I2C example not working #20

RichardWangPhD opened this issue May 1, 2022 · 1 comment
Assignees
Labels

Comments

@RichardWangPhD
Copy link

RichardWangPhD commented May 1, 2022

Problem: I'm able to use your example code to blink the connected LED when using the hardwired I2C connection. However, I am unable to make the LED blink even when using the example code supplied with the library (SoftwareI2CExample).

Circuit setup: Standard setup using Arduino Nano with Adafruit PCA9685 breakout and 10k pull resistors.

Troubleshooting:

  • I've ensured that all connections and designated pins for the software I2C are correct, and that the LED is functioning correctly.
  • Using the hardwired I2C example (SimpleExample), the LED operates as expected.
  • I have checked under an oscilloscope that the designated Software I2C pins are outputting signals, but the PCA9685 chip is not responding.
  • The #define PCA9685_ENABLE_SOFTWARE_I2C is uncommented, as instructed.
  • I've enabled #define PCA9685_ENABLE_DEBUG_OUTPUT and also used the printModuleInfo() function. I found that under hardwired I2C mode, the Mode1 Register returns 0x20, meaning that only PCA9685_MODE1_AUTOINC is enabled. However, under Software I2C mode, the Mode1 Register returns 0xFF (indeed all Registers return 0xFF), meaning all bits are enabled. This includes bit 4 for SLEEP MODE.
  • Using printModuleInfo() before initialisation in hardwired I2C shows NACK error in the Module Info output, which I think is expected as the printModuleInfo() was called before the initialisation. However in software I2C mode shows the same outputs as before, with 0xFF on all bits in all registers.

Thanks!

@NachtRaveVL NachtRaveVL self-assigned this May 6, 2022
@NachtRaveVL NachtRaveVL added the bug label May 6, 2022
@NachtRaveVL
Copy link
Owner

Valid bug, will need to get a looking at this sooner than later for time constraints discussed offline. #20

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

No branches or pull requests

2 participants