CHAPTER 5. PERIPHERAL HARDWARE FUNCTIONS

(b) To transmit/receive MSB-first data using an external clock (slave operation).

μPD75402A

Other Microcomputer

P01/SCK

SCK

SI

SO

SO/SB0

SI

<Sample program>

 

Main routine

 

MOV

XA, #80H

 

MOV

CSIM, XA

; Serial operation stopped, external clock specification

MOV

XA, TDATA

 

MOV

SIO, XA

; Transfer data setting & start of transfer

EI

IECSI

 

EI

 

 

Interrupt routine

 

MOV

XA, TDATA

 

XCH

XA, SIO

; Receive data ÷ send data & start of transfer

MOV

RDATA, XA

; Receive data save

RETI

 

 

92

Page 103
Image 103
NEC PD75402A, PD75P402 user manual MOV XA, Tdata SIO, XA, Iecsi, MOV XA, Tdata XCH XA, SIO, Mov Rdata, Xa, Reti