em6521 EM Microelectronic, em6521 Datasheet - Page 24

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.5 Detailed Functional Description
Master or Slave mode is selected in the control register RegSCntl1.
In Slave mode, the serial clock comes from an external device and is input via the PSP[3] terminal as a
synchronous clock (SCLKIn) to the serial interface. The serial clock is ignored as long as the Start bit is not
set. After setting Start, only the eight following active edges of the serial clock input PSP[3] are used to shift the
serial data in and out. After eight serial clock edges the Start bit is reset. The PSP[1] terminal is a copy of the
(Start OR Status) bit values, it can be used to indicate to the external master, that the interface is ready to
operate or it can be used as a chip select signal in case of an external slave.
In Master mode, the synchronous serial clock is generated internally from the system clock. The frequency is
selected from one out of three sources ( MS0 and MS1 bits in RegSCntl1) . The serial shifting clock is only
generated during Start = high and is output to the SCLK terminal as the Master Clock (SCLKOut). When Start
is low, the serial clock output on PSP[3] is 0.
An interrupt request IRQSerial is generated after the eight shift operations are done. This signal is set by the
last negative edge of the serial interface clock on PSP[3] (master or slave mode) and is reset to 0 by the next
write of Start or by any reset. This interrupt can be masked with register RegIRQMask3. For more details
about the interrupt handling see chapter
Serial data input on PSP[0] is sampled by the positive or negative serial shifting clock edge, as selected by the
Control Register POSnNeg bit. Serial data input is shifted in LSB first or MSB first, as selected by the Control
Register MSBnLSB bit.
6.6.6 Output Modes
Serial data output is given out in two different ways (Refer also to
- OM[1] = 1, OM[0] = 0 :
The serial output data is generated with the
selected shift register clock (POSnNeg). The
first data bit is available directly after the Start
bit is set.
-OM[1] = 0, OM[0] = 1 :
The serial output data is re-synchronized by
the positive serial interface clock edge,
independent of the selected clock shifting
edge. The first data bit is available on the first
positive serial interface clock edge after
Start=‘1’.
Table 6.6.6 Output Mode Selection in RegSCntl2
Tristate output is selected by default.
Copyright © 2005, EM Microelectronic-Marin SA
OM[1]
0
0
1
1
R
OM[0]
0
1
0
1
Output mode
Tristate
Serial-
Synchronized
Serial-Direct
Parallel
1 0.
1 1 8 H
Figure 16. Direct or Re-Synchronized Output
Description
Output disable (tristate on PSP[3:0])
Re-synchronized positive edge data shift out
Direct shift pos. or neg. edge data out
Parallel port SP output
SIN
SIN
+ve/-ve Edge
+ve/-ve Edge
bit7
bit0
bit7
bit0
24
bit6
bit1
bit6
bit1
bit5
bit2
bit5
bit2
1 1 9 H
Figure 16 and
bit4
bit3
bit4
bit3
bit3
bit4
bit3
bit4
+ve Edge clock
bit2
bit5
bit2
bit5
MSBnLSB
bit1
bit6
bit1
bit6
F igure 17).
1 2 0 H
bit0
bit7
bit0
bit7
www.emmicroelectronic.com
EM6521
M
U
X
M
U
X
Direct
Shift Out
Re-synchronised
shift out
bit[n
]
SOUT
SOUT

Related parts for em6521