beautypg.com

NEC PD78F9488 User Manual

Page 209

background image

CHAPTER 11 SERIAL INTERFACE 20

User’s Manual U15331EJ4V1UD

209

(f) Reading receive data

When the reception completion interrupt (INTSR20) occurs, receive data can be read by reading the
value of receive buffer register 20 (RXB20).
To read the receive data stored in receive buffer register 20 (RXB20), read while reception is enabled
(RXE20 = 1).

Remark However, if it is necessary to read receive data after reception has stopped (RXE20 = 0), read

using either of the following methods.

(a) Read after setting RXE20 = 0 after waiting for one cycle or more of the source clock

selected by BRGC20.

(b) Read after bit 2 (DIR20) of serial operation mode register 20 (CSIM20) is set (1).

Program example of (a) (BRGC20 = 00H (source clock = fx/2))

INTREX:

;

NOP

;2

clocks

CLR1

RXE20

;Reception

stopped

MOV A, RXB20

;Read receive data


Program example of (b)

INTRXE:

;

SET1

CSIM20.2

;DIR20 flag is set to LSB first

CLR1

RXE20

;Reception

stopped

MOV A, RXB20

;Read receive data

This manual is related to the following products: