Chapter 12: I²C (Inter Integrated Circuit) module
* Introduction
* 12.1 Operating modes of I2C module
* 12.1.1 I2C slave mode with 7-bit addressing
* 12.1.2 I2C slave mode with 10-bit addressing
* 12.1.3 I2C master mode
* 12.2 Baud-rate generator
* 12.3 I2C module interrupts
* 12.4 Slope control
* 12.5 Intelligent peripheral management interface (IPMI) support
* 12.6 General call address support
* 12.7 Operation of I2C module in SLEEP and IDLE states
* 12.7.1 Operation of I2C module in SLEEP state
* 12.7.2 Operation of I2C module in IDLE state Auto baud support
Introduction
The Inter Integrated Circuit (I2C) module is a serial interface primarily intended for communication with other peripheral or microcontroller devices. Examples of the peripheral devices are: serial EEPROM memories, shift registers, display drivers, serial AD converters, etc. In the dsPIC30F family of devices the I2C module can operate in the following systems:
* the dsPIC30F device is a slave device,
* the dsPIC30F device is a master device in a single-master environment (slave may also be active),
* the dsPIC30F device acts as a master/slave device in a multi-master system (bus collision detection and arbitration available).
The I2C module contains independent I2C master logic and I2C slave logic each generating interrupts based on their events. In multi-master systems, the software is simply partitioned into master controller and slave controller. When the master logic is active, the slave logic remains active also, detecting the state of the bus and potentially receiving messages from itself or from other I2C devices. No messages are lost during multi-master bus arbitration. In a multi-master system, bus collision conflicts with other masters in the system are detected and the module provides a method to terminate and then restart the messages.
Read the rest of this entry »