Slave Operation - NEC V850ES/KE1+ User Manual

32-bit single-chip microcontrollers
Table of Contents

Advertisement

16.15.3 Slave operation

The following shows the processing procedure of the slave operation.
Basically, the operation of the slave device is event-driven.
(processing requiring a significant change of the operation status, such as stop condition detection during
communication) is necessary.
The following description assumes that data communication does not support extension codes. Also, it is assumed
that the INTIIC0 interrupt servicing performs only status change processing and that the actual data communication is
performed during the main processing.
2
I
C
Therefore, the following three flags are prepared so that the data transfer processing can be performed by
transmitting these flags to the main processing instead of the INTIIC0 signal.
(1) Communication mode flag
This flag indicates the following communication statuses.
Clear mode:
Communication mode: Data communication in progress (valid address detection stop condition detection,
(2) Ready flag
This flag indicates that data communication is enabled. This is the same status as an INTIIC0 interrupt during
normal data transfer. This flag is set in the interrupt servicing block and cleared in the main processing block.
The ready flag for the first data for transmission is not set in the interrupt servicing block, so the first data is
transmitted without clearance processing (the address match is regarded as a request for the next data).
(3) Communication direction flag
This flag indicates the direction of communication and is the same as the value of the IICS0.TRC0 bit.
The following shows the operation of the main processing block during slave operation.
2
Start I
C0 and wait for the communication enabled status. When communication is enabled, perform transfer using
the communication mode flag and ready flag (the processing of the stop condition and start condition is performed by
interrupts, conditions are confirmed by flags).
For transmission, repeat the transmission operation until the master device stops returning ACK. When the master
device stops returning ACK, transfer is complete.
CHAPTER 16 I
Figure 16-17. Software Outline During Slave Operation
INTIIC0
Interrupt servicing
Setting, etc.
Data
Setting, etc.
Data communication not in progress
ACK from master not detected, address mismatch)
User's Manual U16896EJ2V0UD
2
C BUS
Therefore, processing by an INTIIC0 interrupt
Flag
Main processing
521

Advertisement

Table of Contents
loading

This manual is also suitable for:

?pd70f3302?pd703302?pd70f3302y?pd703302y

Table of Contents