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!
Содержание MB90390 Series
Страница 2: ......
Страница 4: ......
Страница 17: ...xiii APPENDIX D List of Interrupt Vectors 690 INDEX 695 ...
Страница 18: ...xiv ...
Страница 132: ...104 CHAPTER 5 CLOCKS ...
Страница 152: ...124 CHAPTER 6 CLOCK MODULATOR ...
Страница 210: ...182 CHAPTER 11 TIME BASE TIMER ...
Страница 218: ...190 CHAPTER 12 WATCHDOG TIMER ...
Страница 264: ...236 CHAPTER 14 16 BIT RELOAD TIMER WITH EVENT COUNT FUNCTION ...
Страница 274: ...246 CHAPTER 15 WATCH TIMER ...
Страница 306: ...278 CHAPTER 17 DTP EXTERNAL INTERRUPTS ...
Страница 338: ...310 CHAPTER 18 8 10 BIT A D CONVERTER ...
Страница 364: ...336 CHAPTER 19 UART0 UART1 ...
Страница 398: ...370 CHAPTER 20 UART2 UART3 Figure 20 5 2 ORE Set Timing Receive data RDRF ORE ...
Страница 432: ...404 CHAPTER 20 UART2 UART3 ...
Страница 482: ...454 CHAPTER 22 SERIAL I O ...
Страница 560: ...532 CHAPTER 24 STEPPING MOTOR CONTROLLER ...
Страница 582: ...554 CHAPTER 27 ROM MIRRORING MODULE ...
Страница 632: ...604 CHAPTER 29 EXAMPLES OF SERIAL PROGRAMMING CONNECTION ...
Страница 722: ...694 APPENDIX ...
Страница 723: ...695 INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 740: ......