Skip to content

i2c Register Auto-increment support #10

Closed Answered by PaulNNaish
PaulNNaish asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, EasyMCP2221 does support automatic increment
from examples/ledbar/PCA9685.py
Line 27: AI = 1<<5 (AI = "AutoIncrement")

Line 115:
if update:
timer_on, timer_off = self.calculate_timers(duty, delay)
v = [
timer_on % 256,
int(timer_on / 256),
timer_off % 256,
int(timer_off / 256)
]
self.pca.write_register(self.LED0_ON_L + 4*led, v)

v is a 4 bytes (effectively).

It gives me enough to go on thank you.

P.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@PaulNNaish
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by electronicayciencia
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants