Datasheet
V850ES/JG3-H, V850ES/JH3-H CHAPTER 19 I
2
C BUS
R01UH0042EJ0500 Rev.5.00 Page 877 of 1513
Aug 12, 2011
19.16 Communication Operations
The following shows three operation procedures together with flowcharts.
(1) Master operation in single master system
The flowchart when using the V850ES/JG3-H and V850ES/JH3-H as the master in a single master system is
shown below.
This flowchart is broadly divided into initial settings and communication processing. Execute the initial settings at
startup. If communication with a slave is required, prepare the communication and then execute communication
processing.
(2) Master operation in multimaster system
In the I
2
C0n bus multimaster system, whether the bus is released or used cannot be judged by the I
2
C bus
specifications when the bus takes part in a communication. Here, when data and the clock are at a high level for a
certain period (1 frame), the V850ES/JG3-H or V850ES/JH3-H takes part in communication in a bus release state.
This flowchart is broadly divided into initial settings, communication waiting, and communication processing. The
processing when the V850ES/JG3-H or V850ES/JH3-H loses in arbitration and is specified as the slave is omitted
here, and only the processing as the master is shown. Execute the initial settings at startup to take part in
communication. Then, wait for the communication request as the master or wait for the specification as the slave.
The actual communication is performed in the communication processing, and includes arbitration with other
masters data as well as transmission/reception with the slave.
(3) Slave operation
An example of when the V850ES/JG3-H or V850ES/JH3-H is used as the slave of the I
2
C0n bus is shown below.
When used as the slave, operation is started by an interrupt. Execute the initial settings at startup, then wait for
INTIICn interrupt occurrence (communication waiting). When the INTIICn interrupt occurs, the communication
status is judged and its result is passed as a flag to the main processing.
By checking the flags, the necessary communication processing can be performed.
Remark n = 0 to 2