11.07.2015 Views

uPD789074 Subseries 8-Bit Single-Chip Microcontrollers UD - Home

uPD789074 Subseries 8-Bit Single-Chip Microcontrollers UD - Home

uPD789074 Subseries 8-Bit Single-Chip Microcontrollers UD - Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 9 SERIAL INTERFACE 20(f) Reading receive dataWhen the reception completion interrupt (INTSR20) is generated, read the value of receive bufferregister 20 (RXB20) to read the receive data.When reading the receive data stored in receive buffer register 20 (RXB20), enable the receiveoperation (RXE20 = 1).Remark If the receive data must be read after the receive operation has been disabled (RXE20 = 0),use either method below.(a) After waiting for 1 cycle or more of the source clock selected by BRGC20, set RXE20 to0, and then read the receive data.(b) Set bit 2 (DIR20) of serial operation mode register 20 (CSIM20) to 1, and read the receivedata.Example program for (a) (BRGC29 = 00H (source clock = fx/2))INTRXE:;Reception completion interrupt routineNOP;2 clocksCLR1 RXE20 ;Stop reception operationMOV A,RXB20 ;Read receive dataExample program for (b)INTRXE:;Reception completion interrupt routineSET1 CSIM20.2 ;Set the DIR20 flag to LSB firstCLR1 RXE20 ;Stop reception operationMOV A,RXB20 ;Read receive data138User’s Manual U14801EJ3V1<strong>UD</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!