Download USER`S MANUAL

Transcript
S3C72P9/P72P9 (Preliminary Spec)
SERIAL I/O INTERFACE
SERIAL I/O BUFFER REGISTER (SBUF)
The serial I/O buffer register ,SBUF, can be read or written using 8-bit RAM control instructions. Following a RESET,
the value of SBUF is undetermined.
When the serial interface operates in transmit-and-receive mode (SMOD.1 = "1"), transmit data in the SIO buffer
register are output to the SO pin (P0.1) at the rate of one bit for each falling edge of the SIO clock. Receive data are
simultaneously input from the SI pin (P0.2) to SBUF at the rate of one bit for each rising edge of the SIO clock.
When receive-only mode is used, incoming data are input to the SIO buffer at the rate of one bit for each rising edge
of the SIO clock.
F PROGRAMMING TIP — Setting Transmit/Receive Modes for Serial I/O
1. Transmit the data value 48H through the serial I/O interface using an internal clock frequency of fxx/2 and in
MSB-first mode:
BITS
SMB
LD
LD
LD
LD
LD
LD
BITS
EMB
15
EA,#03H
PMG1,EA
EA,#0E6H
SMOD,EA
EA,#48H
SBUF,EA
SMOD.3
; P0.0 / SCK and P0.1 / SO ← Output
;
;
; SIO data transfer
SCK/P0.0
External
SO/P0.1
Device
[S3C72P9]
2. Use CPU clock to transfer and receive serial data at high speed:
STEST
BITS
SMB
LD
LD
LD
LD
LD
LD
BITS
BITR
BTSTZ
JR
LD
SMB
LD
EMB
15
EA,#03H
PMG1,EA
EA,#47H
SMOD,EA
EA,TDATA
SBUF,EA
SMOD.3
IES
IRQS
STEST
EA,SBUF
0
RDATA,EA
; P0.0 / SCK and P0.1 / SO ← Output, P0.2 / SI
; ← Input
; SIO start
13-5