Page 1 of 1
Can I increase the I2C maximum packet length?
Posted: Mon Jan 04, 2010 7:45 am
by The Altruist
From the I2CMulti.h
Code: Select all
#define I2C_MAX_BUF_SIZE (64) // Size allocated to input and output buffers in slave mode I2C
So... is this unyielding unchangeable law or can I pad this a little?
Re: Can I increase the I2C maximum packet length?
Posted: Mon Jan 04, 2010 11:17 am
by lgitlitz
You should be able to make this as large as you want. The buffer is defined as a global so you do not need to worry about any stack overflows, just running out of RAM. You need to recompile the system files after you change the buffer size
Re: Can I increase the I2C maximum packet length?
Posted: Mon Jan 04, 2010 11:30 am
by The Altruist
Hey, thanks a lot! I was worried when I saw 64 as a limit for a few other I2C devices. Also, where's the "Index" menu I've seen mentioned before?
Re: Can I increase the I2C maximum packet length?
Posted: Mon Jan 04, 2010 11:44 am
by lgitlitz
The Altruist wrote:Hey, thanks a lot! I was worried when I saw 64 as a limit for a few other I2C devices. Also, where's the "Index" menu I've seen mentioned before?
Not sure what the Index menu is, where did you see this?
Re: Can I increase the I2C maximum packet length?
Posted: Mon Jan 04, 2010 12:41 pm
by The Altruist
Wasn't sure how to describe it, but I found it. I had to Re-index the project so the Macro Expansion for I2C_MAX_BUF_SIZE would be right. Right click on the project. Of course.
EDIT: Yeah, that was my ticket in the system. Thanks for that!