ROBOTC.net forums
http://www.robotc.net/forums/

Maximum message Length size in I2C sendI2CMsg()
http://www.robotc.net/forums/viewtopic.php?f=1&t=5603
Page 1 of 1

Author:  tarribas [ Mon Mar 11, 2013 8:58 am ]
Post subject:  Maximum message Length size in I2C sendI2CMsg()

Hi,

I'm sending a big amount of data by I2C from the NXT as Master to an Arduino slave device.

My problem is when the sendI2CMsg() sends more than 15 bytes.
When the size of the packet is over 15 bytes in the Arduino size always the reception is 15bytes.

Is in the NXT side a limitiation or a variable to establish the size to send packets over 15 bytes of data?

Thank you.

Author:  tarribas [ Tue Mar 12, 2013 4:52 am ]
Post subject:  Re: Maximum message Length size in I2C sendI2CMsg()

As I supposed, there are a 16 bytes LEGO NXT limitation in the input/output i2c buffering, as is described in the HDK.:-(

With this limitation the maximun I2C througput is about 232 writes per second or 26kbps(payload).
232writes per second*8bits per byte*14bytes(payload)=26kbps.

Author:  mightor [ Tue Mar 12, 2013 8:03 am ]
Post subject:  Re: Maximum message Length size in I2C sendI2CMsg()

I wrote some articles about this a while back:

= Xander

Author:  mattallen37 [ Tue Mar 12, 2013 10:58 am ]
Post subject:  Re: Maximum message Length size in I2C sendI2CMsg()

With the standard Lego FW I2C being limited to 9600 bps (not even "fast" I2C is supported in the lego FW), I felt I needed a much faster means of communication. I now mostly use RS485. The Arduino and NXT communicate nicely at 115200 baud (or 11.5 kBps payload, which would be about 92 kbps).

Author:  mattallen37 [ Tue Mar 12, 2013 11:02 am ]
Post subject:  Re: Maximum message Length size in I2C sendI2CMsg()

Oh, and RS485 allows many more bytes in a single transaction (much larger buffers). IIRC, the Arduino Serial buffers are limited to either 32 or 64 bytes. I'm pretty sure the Lego NXT FW allowed 64 bytes, but John Hansen's EFW allows up to 128 bytes. I would assume the ROBOTC FW allows up to either 64 or 128 bytes.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/