-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
More than 32 bytes cannot be written via I2C #246
Comments
I will try it later today. I'm not at home just now. |
The 32 byte limit is a common hard coded limit used in the Wire library. You can change this in the Wire.h library somewhere but I usually just accept this and buffer data writes in 32 byte chunks to keep the code platform agnostic. |
@me-no-dev @kriswiner Does it make sense to add an API to set the Wire library to change the byte limit from a set default? Is there any known implementation where this has been done before? |
Just change it yourself. 32 bytes is standard for avr arduinos. I have
bumped mine up to 64, which is enough for most tasks. You can also just
read/write twice!
…On Fri, Aug 25, 2017 at 2:44 PM Jason K. ***@***.***> wrote:
@me-no-dev <https://github.com/me-no-dev> @kriswiner
<https://github.com/kriswiner> Does it make sense to add an API to set
the Wire library to change the byte limit from a set default? Is there any
known implementation where this has been done before?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#246 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qoiF_P898MSlW5tN4sQgtaLe1OKKks5sb0AfgaJpZM4MSlqV>
.
|
Fixed with I2C RC1 |
When I try to write more than 32 bytes (2B for address + >30B data) via I2C to AT24C256 EEPROM device, next written byte is NAKed. I guess it's because a new transaction is started and EEPROM device thinks that is a new (PAGE) WRITE command. AT24C256 supports up to 64 bytes to be transferred with that command.
Note: Between PAGE WRITE and any other command has to be a delay (max 5ms by datasheet) to be data physically written, so this is the reason of NAK.
Test code:
The text was updated successfully, but these errors were encountered: