Panasonic MN101C77C, F77G user manual XI 60 Operation

Models: F77G MN101C77C

1 544
Download 544 pages 59.61 Kb
Page 386
Image 386

Chapter 11 Serial Interface 0, 1

 

Setup Procedure

 

Description

 

 

 

(14)

Enable the interrupt.

(14) Set the SC0RIE flag of the SC0RICR register

 

SC0RICR(x'3FF4')

to "1", and set the SC0TIE flag ot the

 

bp1 : SC0RIE = 1

SC0TICR register to "1" to enable the interrupt

 

SC0TICR(x'3FF5')

request.

 

 

bp1 : SC0TIE = 1

If any interrupt request flag is already set, clear

 

 

them.

 

 

 

[

Chapter 3. 3-1-4 Interrupt Flag Setup ]

(15)

Set the baud rate timer.

(15) Set the baud rate timer by the TM5MD register,

 

 

the TM5OC register. Set the TM5EN flag to "1" to

 

 

start timer 4.

 

 

[

Chapter 6. 6-8 Serial Transfer Clock ]

(16)

Start serial communication.

(16) The transmission is started by setting the

 

The transmission data TXBUF0

transmission data to the serial transmission data

 

(x'3F91')

buffer (TXBUF0). When the transmission has

 

The received data input to RXD0A

finished, the serial 0 transmission interrupt

 

 

(SC0TIRQ) is generated. After the serial data is

 

 

input from the RXD0A pin and the start condition is

 

 

recognized, the received data is stored.

 

 

When the reception has finished, the received

 

 

data is stored to the serial received data buffer

 

 

RXBUF0 and the serial 0 reception data buffer

 

 

interrupt SC0RICR is generated.

 

 

 

 

Note : (6) to (7), (8) to (10), (11) to (13) can be set at once.

When the TXD0 / RXD0 pin are connected for communication with 1 channel, the TXD0 pin inputs / outputs serial data. The port direction control register P0DIR switches I/O. At recep- tion, set SC0SBIOS of the SC0MD1 register to "1" to select serial data input. The RXD0 pin can be used as a general port.

It is possible to shut down the communication. If the communication should be stopped by force, set SC0SBOS and SC0SBIS of the SC0MD1 register to "0".

Each flag should be set as its procedure in order. Activation for communication should be operated after all control registers (except Table 11-2-1 : TXBUF0, RXBUF0) are set.

XI - 60 Operation

Page 386
Image 386
Panasonic MN101C77C, F77G user manual XI 60 Operation