Can I increase the I2C maximum packet length?

Discussion to talk about software related topics only.
Post Reply
The Altruist
Posts: 11
Joined: Mon May 11, 2009 2:01 pm

Can I increase the I2C maximum packet length?

Post 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?
User avatar
lgitlitz
Posts: 331
Joined: Wed Apr 23, 2008 11:43 am
Location: San Diego, CA
Contact:

Re: Can I increase the I2C maximum packet length?

Post 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
The Altruist
Posts: 11
Joined: Mon May 11, 2009 2:01 pm

Re: Can I increase the I2C maximum packet length?

Post 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?
User avatar
lgitlitz
Posts: 331
Joined: Wed Apr 23, 2008 11:43 am
Location: San Diego, CA
Contact:

Re: Can I increase the I2C maximum packet length?

Post 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?
The Altruist
Posts: 11
Joined: Mon May 11, 2009 2:01 pm

Re: Can I increase the I2C maximum packet length?

Post 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!
Post Reply