Datasheet
Jon Waddington
42
3.8.2 I2C
The I2C bus allows for bi-directional communications using a Serial Data (SDA) line and
a Serial Clock (SCL) line. Both of these lines are connected to the positive line via a
4.7kΩ resistor, as shown in figure 3.8.1. One bit of data is sent on every clock pulse and
the SDA line must be stable during the high state of the SCL line.
In the Information System, the Propeller chip acts as the master as it controls the
messages on the I2C bus.
To start communicating on the bus, a Start condition must be performed. This involves
the Propeller chip pulling the SDA line down while the SCL line remains high.
The first byte of a message is the addressing byte which is used to determine which
device is to be communicated with. The PCF8563 has two addresses, 0xA3 is used to
read a register and 0xA2 is used to write a value to a register. After the PCF8563 has
been addressed, it transmits an acknowledge bit to the Propeller chip by pulling the SDA
line low during the corresponding SCL high pulse.
A register address is sent from the Propeller on the next byte, which is the address of
the register which is to be read or written to. Another acknowledge bit is then sent from
the PCF8563.
If the read address was transmitted first, the PCF8563 transmits the value of the desired
register and receives and leaves the SDA line high to signal the end of the data transfer
without an acknowledge bit. If the write address was transmitted first, the Propeller
transmits the value to be stored in the desired register in the PCF8563 and the RTC
transmits an acknowledge bit.
The message is ended with a Stop condition, where the SDA line goes high while the SCL
line is high.










