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

The readRegister operation obscures next write with SoftwareI2C #5

Closed
svatoun opened this issue Nov 29, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@svatoun
Copy link

commented Nov 29, 2017

I am testing PCA9685 library with SoftwareI2C and I've encountered an issue during initializaiton - setPWMFrequency does not work.
It turned out that at the end of readRegister operation, the I2C does not issue STOP bit; since the next writeRegister issues start bit, the entire transaction (write into the MODE1, which enables setting the prescaler) is rejected and subsequently the prescaler value will be ignored.
The call _i2cWrite->requestFrom() defaults to sending STOP bit after last expected byte from I2C is read.

@NachtRaveVL

This comment has been minimized.

Copy link
Owner

commented Feb 8, 2018

Oooooo, good catch!!! I'll be updating this one here in a sec. =)

@NachtRaveVL NachtRaveVL closed this Feb 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.