Panasonic MN101C77C, F77G user manual Start Condition and Stop Condition

Models: F77G MN101C77C

1 544
Download 544 pages 59.61 Kb
Page 414
Image 414

Chapter 12 Serial Interface 3

„Start Condition Setup

At IIC communication, enable start condition by the SC3STE flag of the SC3MD0 register at the begin- ning of communication. The SC3STE flag of the SC3MD0 register can select if start condition is enabled or not.

If start condition is detected during data communication when the start condition is enabled, the SC3STC flag of the SC3CTR register is set to "1", and the communication complete interrupt SC3IRQ is gener- ated to finish the transmission. At this case, the communication is not normal so that something should be done by the software, such a counter measure of stop condition, and the communication should be started again.

The SC3STC flag should be cleared by the software.

Start condition is generated as data line (SDA pin) is changed from "H" to "L", when clock line (the SLC pin) is "H".

„Generation of Stop Condition

Stop condition is generated as the SDA line is changed from "L" to "H", when the SCL line is "H". Stop condition can be generated by setting the IICBSY flag of the SC3CTR register to "0" by the software. When the IICBSY flag is "0", use the program with data output function of a general port.

Start condition

Stop condition

SDA

(Serial data)

SCL

(Serial clock)

Figure 12-3-12 Start Condition and Stop Condition

„Input Edge/Output Edge Setup

At IIC communication, data is always received at the falling edge of clock. Set the SC3CE1 flag of the SC3MD0 register to "1", and select "falling" at the received data input edge. Even if the SC3CE1 flag is set to "0", the received data is stored at the falling edge of clock, but any error is generated because IIC clock line (SCL) becomes "H" after the communication of the last data.

At IIC communication, set the SC3CE1 flag of the SC3MD0 register to "1" to select "falling" of the received data input edge.

„Data I/O Pin Setup

The SDA pin (for SBO3 pin, too) is used to input/output data. Set the SC3IOM flag of the SC3MD1 register to "1" to input serial data from the SBO3 pin. The SBI3 pin is not used, so it can be used as a general port. But, always set the SC3SBIS flag of the above register to "1" to set "input serial data".

To detect start condition, set the SC3SBIS flag of the SC3MD1 register to "input serial data", regardless of transmission/reception.

XII - 28 Operation

Page 414
Image 414
Panasonic MN101C77C, F77G user manual Start Condition and Stop Condition