Technical information
Chapter 5: JAVA API
July 15, 2008 G24 KJAVA User’s Guide 5-15
I2C default configuration:
After opening I2C connection, its default configuration will be:
Bus mode: Single master.
Data rate: Standard.
Device address type: 7 bits.
Register address length: 0 byte.
Start Type: start bit.
Receive start bit enabled: True.
Receive stop bit enabled: True.
I2C performance
:
• Data rate -
1. I2C support standard mode - up to 100 Kbit/s.
2. G24 I2C bus effective data rate is 80 Kbit/sec.
3. Due to I2C devices characteristic of fully data rate downwards compatible, G24 will be
able to communicate with I2C devices that support higher data rate such as Fast mode (up
to 400 Kbit/s), or High speed (up to 3.4 Mbit/s).
• Max datagram size is limited to 1024 Bytes (datagram will be fragmented to chunks of 128
bytes).
I2C HW adjustment
:
In order to adjust bus lines rising time to I2C specification, 4.7 KOhm pull up resisters must be
connect to bus lines.
I2C restrictions
:
• I2C API support only single master mode. Any attempt to set another configuration will
generate exception.
• I2C API support only 7 bits device address. Any attempt to set another configuration will
generate exception.
• I2C API support 0, 1 or 2 bytes register address length. Any attempt to set another
configuration will generate exception.
• I2C API support only standard data rate. Any attempt to set another configuration will
generate exception.
• MIDlet will be able to open only single I2C Connection for each bus ID. Any attempt to open
another connection of this bus will generate exception.
• I2C bus shares physical bus lines with GPIO API. On power up these lines are not dedicated
to I2C-bus utilizing.
• In case the GPIO lines are already being used (GPIO API already holds them), I2C
connection will not be opened and will generate exception.
• Until closing connection any attempt to configure these lines to work as GPIO lines will
generate GpioException.
• Max datagram size is limited to 1024 Bytes. Upon attempt to exceed this limitation, request
will be ignored and IOException will be generated.
• Max stretching time, allowed by attached device to the bus is 100 ms. If after 100 ms the
attached device still holds the SCL line, the G24 will return one of the following :
1. Device not response - in case it is the first byte transfer on the bus.