
432
CHAPTER 21 400 kHz I
2
C INTERFACE
21.3
I
2
C Interface Operation
The I
2
C bus executes communication using two bi-directional bus lines, the serial data
line (SDA) and serial clock line (SCL). The I
2
C interface has two open-drain I/O pins
(SDA/SCL) corresponding to these lines, enabling wired logic applications.
■
Start Conditions
When the bus is free (BB = 0 in IBSR, MSS = 0 in IBCR), writing "1" to the MSS bit places the I
2
C
interface in master mode and generates a start condition.
If a "1" is written to it while the bus is idle (MSS = 0 and BB = 0), a start condition is generated and the
contents of the IDAR register (which should be address data) is sent.
Repeated start conditions can be generated by writing "1" to the SCC bit when in bus master mode and
interrupt status (MSS = 1 and INT = 1 in IBCR).
If a "1" is written to the MSS bit while the bus is in use (BB = 1 and TRX = 0 in IBSR; MSS = 0 and INT = 0
in IBCR), the interface waits until the bus is free and then starts sending.
If the interface is addressed as slave with write access (data reception) in the meantime, it will start sending
after the transfer ended and the bus is free again. If the interface is sending data as slave in the meantime, it
will not start sending data if the bus of free again. It is important to check whether the interface was
addressed as slave (MSS = 0 in IBCR and AAS = 1 in IBSR), sent the data byte successfully (MSS = 1 in
IBCR) or failed to send the data byte (AL = 1 in IBSR) at the next interrupt.
Writing "1" to the MSS bit or SCC bit in any other situation has no significance.
■
Stop Conditions
Writing "0" to the MSS bit in master mode (MSS = 1 and INT = 1 in IBCR) generates a stop condition and
places the device in slave mode. Writing "0" to the MSS bit in any other situation has no significance.
After clearing the MSS bit, the interface tries to generate a stop condition which might fail if another
master pulls the SCL line low before the stop condition has been generated.
This will generate an interrupt
after the next byte has been transferred!
Summary of Contents for MB90390 Series
Page 2: ......
Page 4: ......
Page 17: ...xiii APPENDIX D List of Interrupt Vectors 690 INDEX 695 ...
Page 18: ...xiv ...
Page 132: ...104 CHAPTER 5 CLOCKS ...
Page 152: ...124 CHAPTER 6 CLOCK MODULATOR ...
Page 210: ...182 CHAPTER 11 TIME BASE TIMER ...
Page 218: ...190 CHAPTER 12 WATCHDOG TIMER ...
Page 264: ...236 CHAPTER 14 16 BIT RELOAD TIMER WITH EVENT COUNT FUNCTION ...
Page 274: ...246 CHAPTER 15 WATCH TIMER ...
Page 306: ...278 CHAPTER 17 DTP EXTERNAL INTERRUPTS ...
Page 338: ...310 CHAPTER 18 8 10 BIT A D CONVERTER ...
Page 364: ...336 CHAPTER 19 UART0 UART1 ...
Page 398: ...370 CHAPTER 20 UART2 UART3 Figure 20 5 2 ORE Set Timing Receive data RDRF ORE ...
Page 432: ...404 CHAPTER 20 UART2 UART3 ...
Page 482: ...454 CHAPTER 22 SERIAL I O ...
Page 560: ...532 CHAPTER 24 STEPPING MOTOR CONTROLLER ...
Page 582: ...554 CHAPTER 27 ROM MIRRORING MODULE ...
Page 632: ...604 CHAPTER 29 EXAMPLES OF SERIAL PROGRAMMING CONNECTION ...
Page 722: ...694 APPENDIX ...
Page 723: ...695 INDEX The index follows on the next page This is listed in alphabetic order ...
Page 740: ......