Package comm
Class I2C
extends Object
In a typical master-slave I2C configuration one single master can exchange data with multiple slave devices.
The iLCD controllerJoC can either be used as I2C master or as I2C slave device.
The I2C class is necessary for both of these modes. In master mode it allows to control the I2C bus exclusively, in slave mode it is
needed for reading and writing data from and to the master device.
Note that in order to use the iLCD controllerJoC as slave device you have to use the
EventManagement system and add
a
OnI2CListener
to the I2CEventDispatcher.
Notes
- I2C has to be enabled in the iLCD project. To do this select the corresponding checkbox in the iLCD Manager XE on the Settings Tab under Hardware Settings.
- An object can be created for every I2C device.
- The iLCD'sJavaino's I2C communication follows the rules of the Philips documents I²C bus specification.pdf which describes the basics of the I2C bus.
- See the Chapter Pin Descriptions in ILCD Panels Specification.pdf
to find out which pins to use for SDA and SCL.
- The iLCD controllerJoC can be configured in fast-mode with up to 400 kHz clock frequency.
- A 7-bit address space is available to add more than 100 slave devices to the I2C bus.
Public Constructors
Public Methods
Methods inherited from java.lang.Object
_INSERT_INHERITED_METHOD_ENTRY_HERE_
Public Fields
- static final int DEFAULT_MASTER_ADDRESS
- static final int DEFAULT_TIMEOUT
- static final int OK
- static final int ERROR
- static final int TIMEOUT
- static final int START_CONDITION_TRANSMITTED
- static final int REPEATED_START_CONDITION_TRANSMITTED
- static final int SLAVE_RECEIVER_ADDRESSED_ACK_RECEIVED
- static final int SLAVE_RECEIVER_ADDRESSED_NACK_RECEIVED
- static final int BYTE_TRANSMITTED_AS_MASTER_ACK_RECEIVED
- static final int BYTE_TRANSMITTED_AS_MASTER_NACK_RECEIVED
- static final int ARBITRATION_LOST
- static final int SLAVE_TRANSMITTER_ADDRESSED_ACK_RECEIVED
- static final int SLAVE_TRANSMITTER_ADDRESSED_NACK_RECEIVED
- static final int BYTE_RECEIVED_AS_MASTER_ACK_TRANSMITTED
- static final int BYTE_RECEIVED_AS_MASTER_NACK_TRANSMITTED
- static final int ADDRESSED_AS_SLAVE_RECEIVER_ACK_TRANSMITTED
- static final int ADDRESSED_AS_SLAVE_RECEIVER_NACK_TRANSMITTED
- static final int DATA_RECEIVED_AS_SLAVE_ACK_TRANSMITTED
- static final int DATA_RECEIVED_AS_SLAVE_NACK_TRANSMITTED
- static final int STOP_OR_REPEATED_START_RECEIVED_AS_SLAVE
- static final int ADDRESSED_AS_SLAVE_TRANSMITTER_ACK_TRANSMITTED
- static final int ARBITRATION_LOST_ADDRESSED_AS_SLAVE_TRANSMITTER_ACK_TRANSMITTED
- static final int BYTE_TRANSMITTED_AS_SLAVE_ACK_RECEIVED
- static final int BYTE_TRANSMITTED_AS_SLAVE_NACK_RECEIVED
- static final int NO_RELEVANT_STATUS_INFORMATION
_INSERT_FIELDS_ENTRY_HERE_
Copyright © demmel products gmbh. All rights reserved.