Panasonic MN103S User Manual page 400

Panaxseries
Hide thumbs Also See for MN103S:
Table of Contents

Advertisement

Chapter 13
Serial Interface 2
Setting Data I/O PIn
Communication modes can be selected from 2 channels (data output pin (SBO2 pin) and data input pin (SBI2
pin)), or 1 channel (data I/O pin (SBO2 pin)). The SBI2 pin can be used only for serial data input. The SBI2 pin
can be used for both serial data input and output. The SC2IOM flag of the SC2CTR1 register can select whether
serial data is fed from the SBI2 pin or SBO2 pin. When "data input from the SBO2 pin" is selected, 1-channel
communication mode is used; so, the P17D flag of the P1DIR register controls the SBO2 pin direction for switch-
ing between transmission and reception. At this time, the SBI2 pin can be used as a general-purpose port since it
is not used.
Reception Buffer Empty Flag Operation
When the reception complete interrupt SC2RIRQ is generated, data is automatically stored from the reception
shift register to SC2RB. If data is stored in the shift register SC2RB, the reception buffer empty flag SC2REMP of
the SC2STR register is set to "1". This indicates that reception data is ready to be read out. SC2REMP is cleared
to "0" when data is read from SC2RB.
Transmission Buffer Empty Flag Operation
If data is set in SC2TB during communication (till the communication complete interrupt SC2TIRQ is generated
after data is load into the transmission shift register), the transmission buffer empty flag SC2TEMP of the SC2TB
register is set to "1". This indicates that the next transmission data is ready to be loaded. When data is loaded into
the internal shift register from SC2TB after SC2TIRQ is generated and when SC2TEMP is cleared to "0", the
next transfer is automatically started.
Reception BUSY Flag Operation
The SC2RBSY flag of the SC2STR register is set to "1" when a start bit is recognized. The flag is cleared to "0"
after generation of the reception complete interrupt SC2RIRQ. The SC2RBSY flag is reset to "0" when the
SC2SBIS flag is set to "0" during reception.
Transmission BUSY Flag Operation
The SC2TBSY flag of the SC2STR register is set to "1" when data is set in SC2TB. The flag is cleared to "0"
after generation of the transmission complete interrupt SC2TIRQ. SC2TBSY flag setup is maintained during con-
tinuous communication. If the transmission buffer empty flag SC2TEMP is set to"0" when the transmission com-
plete interrupt SC2TIRQ is generated, SC2TBSY is cleared to "0". The SC2TBSY flag is reset to "0" when the
SC2SBIS flag is set to "0" during transmission.
Setting Break Status Transmission Control
Break status can be transmitted by the SC2BRKE flag of the SC2CTR2 register. When SC2BRKE is set to "1" to
select break transmission, all from the start to stop bits transmit "0" .
Break Status Reception Judgement
Reception at bread status can be judged. If all received data from the start bit to stop bit are "0", the SC2BRKF
flag of the SC2CTR2 register is set and regards the break status. The SC2BRKF flag is set when the reception
complete interrupt SC2RIRQ is generated.
XIII - 28
Operation

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn103sa7dMn103sa7g

Table of Contents