EasyManua.ls Logo

Cmsemicon CMS32L051 - Page 527

Default Icon
703 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
V1.2.2
CMS32L051 User Manual |Chapter 14 Serial interface IICA
www.mcu.com.cn 527 / 703
(3) Slave operation
The processing steps for the slave operation are as follows.
Dependent operations are basically event-driven, so they need to be handled by INTIICAn interrupts
(which requires a lot of change processing of the operational state such as stop condition detection in
communications).
In this note, it is assumed that the data communication does not support the extension code, the
INTIICAn interrupt processing only performs the state transfer processing and the actual data communication
is carried out by the main processing department.
IICA
interrupt
handling
main process
configurati
onetc.
Data
configuratio
netc.
INTIICAn flag
Therefore, the following three flags are prepared and instead of INTIICAn the flag is passed to the main
processing department for data communication processing.
Communication mode flag
This flag indicates the following two communication states:
Clear Mode: Not in the presence of data communication
status of ongoing data communication (detection of valid address ~
detection of stop condition, no response of the master control device is detected, different addresses).
(2) Ready sign
This flag indicates that data communication can occur. In normal data communication, the same as the
INTIICAn interrupt, which is asserted by the interrupt handling part and cleared by the main processing
department. When communication begins, the flag is cleared by the interrupt handling department. However,
when sending the first data, the interrupt processing department does not assert the readiness flag, so the first
data is sent without clearing the flag (address matching is interpreted as the next data request).
(3) Communication direction signs
This flag indicates the direction of communication, and the value of the TRCn bit is the same.
Remark n=0
The operation of the master processing part of the slave operation is shown below.
Start the serial interface IICA and wait for it to become communicable. If it becomes communicable, the

Table of Contents

Related product manuals