em6521 EM Microelectronic, em6521 Datasheet - Page 21

no-image

em6521

Manufacturer Part Number
em6521
Description
Mfp Version Of Em6621 Ultra Low Power Microcontroller With 4x20 Lcd Driver
Manufacturer
EM Microelectronic
Datasheet
6.6 Port Serial
The EM6521 contains a simple, half duplex three wire synchronous type serial interface., which can be used to
program or read an external EEPROM, ADC, ... etc.
For data reception, a shift-register converts the serial input data on the SIN(PSP[0]) terminal to a parallel
format, which is subsequently read by the CPU in registers RegSDataL and RegSDataH for low and high
nibble. To transmit data, the CPU loads data into the shift register, which then serializes it on the
SOUT(PSP[2]) terminal. It is possible for the shift register to simultaneously shift data out on the SOUT
terminal and shift data on the SIN terminal. In Master mode, the shifting clock is supplied internally by the
Prescaler : one of three prescaler frequencies are available, Ck[16], Ck[15] or Ck[14]. In Slave mode, the
shifting clock is supplied externally on the SCLKIn(PSP[3]) terminal. In either mode, it is possible to program :
the shifting edge, shift MSB first or LSB first and direct shift output. All these selection are done in register
RegSCntl1 and RegSCntl2.
Figure 13. Serial Interface Architecture
The PSP[3..0] terminal configuration is shown in
∗ PSP[1] {Ready / CS) is outputting the ready (slave mode) or the CS signal (master mode).
∗ PSP[2] {SOUT} is always an output.
∗ PSP[0] {SIN} is always an input.
∗ PSP[3] {SCLK} is an output for Master mode {SCLKOut} and an input for Slave mode {SCLKIn}
6.6.1 4-bit Parallel I/O
Selecting OM[1],OM[0] = ‘1’ in register RegSCntl2 the PSP[3:0] terminals are configured as a 4-bit Output.
Output data is stored in the register RegSPData .
The RegSPData is defined as a read/write register, but what is read is not the register output, but the port
PSP[3:0] terminal values
Selecting OM[1],OM[0] = ‘0’ in register RegSCntl2 the PSP[3:0] outputs are cut off (tristate). The terminals
can be used as inputs with individual (bit-wise) pull-up or pull-down settings.
Independent of the selected configuration, the PSP[3:0] terminal levels are always readable.
Copyright © 2005, EM Microelectronic-Marin SA
Internal Master Clock Source
(SCLKIn from SCLK terminal)
External Slave Clock Source
(from Prescaler)
4-Bit Internal Data Bus
R
High-Z to all
SP[3:0] Terminals
Registers
Control
Status
Serial Input Data
Mode
&
M
U
X
from SIN
terminal
Clock
Enable
F igure 14. When the Serial Interface is active then :
1 1 7 H
Status
Write
Shift CK
Tx
8 Bit Shift Register
Reset
Start
Start Direct MSB/LSB
Read
Control Logic
21
Rx
Shift
First
Shift Complete
(8th Shift Clock)
SCLKOut to SCLK Terminal
www.emmicroelectronic.com
Serial Master Clock Output
Serial Output Data
to SOUT Terminal
EM6521
IRQSerial
Status to
CS/ Ready
Terminal

Related parts for em6521