December 22, 2003
Document No. 38-12011 Rev. *E
205
CY8C24xxx Preliminary Data Sheet
Digital Blocks
as the MS block polynomial (DR1) and 10h as the LS block
polynomial value.
Determining the PRS Polynomial
Generally, PRS (pseudo random sequence) polynomials are
selected from pre-computed reference tables. It is important
to note that there are two common ways to specify a PRS
polynomial: simple register configuration and modular con-
figuration. In the simple method, a shift register is imple-
mented with a reduction XOR of the MSB and feedback taps
as input into the least significant bit. In the modular method,
there is an XOR operation implemented between each reg-
ister bit and each tap point enables the XOR with the MSB
for that given bit. The CRCPRS function implements the
modular approach.
Converting a Polynomial Spec to a Modular Spec
These are equivalent methods. However, there is a conver-
sion that should be understood. If tables are specified in
simple register format, then a conversion can be made to
the modular format by subtracting each tap from the MS tap
as shown in the following example.
To implement a 7-bit PRS of length 127, one possible code
is [7,6,4,2]s, which is in simple format. The modular format
would be [7,7-2,7-4,7-6]m or [7,5,3,2]m. Determining the
polynomial to program is similar to the CRC example above.
Set a binary bit for each tap (with bit 0 of the register corre-
sponding to tap 1). Therefore, the code [7,5,3,2] would cor-
respond to 01010110 or 56h.
In both the CRC and PRS cases, an appropriate Seed value
should be selected that is greater than or equal in bit length.
17.1.8.1
Usability Exceptions
The following are usability exceptions for the CRCPRS func-
tion.
1.
The polynomial register must only be written when the
block is disabled.
17.1.8.2
Block Interrupt
The CRCPRS has one fixed interrupt source, which is the
compare auxiliary output.
17.1.9
SPI Protocol Function
The Serial Peripheral Interface (SPI) is a Motorola specifica-
tion for implementing full-duplex synchronous serial commu-
nication between devices. The 3-wire protocol uses both
edges of the clock to enable synchronous communication,
without the need for stringent setup and hold requirements.
Figure 17-5. Basic SPI Configuration
A device can be a Master or Slave. A Master outputs clock
and data to the Slave device and inputs Slave data. A Slave
device inputs clock and data from the Master device and
outputs data for input to the Master. The Master and Slave
together are essentially a circular shift register, where the
Master is generating the clocking and initiating data trans-
fers.
A basic data transfer occurs when the Master sends 8 bits of
data, along with eight clocks. In any transfer, both Master
and Slave are transmitting and receiving simultaneously. If
the Master is only sending data, the received data from the
Slave is ignored. If the Master wishes to receive data from
the Slave, the Master must send dummy bytes to generate
the clocking for the Slave to send data back.
17.1.9.1
SPI Protocol Register Definitions
The SPI Protocol register definitions are located in
Table 17-
4
. The use of the SS_ signal varies according to the capabil-
ity of the Slave device.
SPI Master
SPI Slave
MOSI
SCLK
SS_
MISO
MOSI
MISO
SCLK
Data is output by both
the Master and Slave, on
one edge of the clock.
Data is registered at the input
of both devices, on the
opposite edge of the clock.
MOSI
SCLK
SS_
MISO
Table 17-4. SPI Protocol Register Descriptions
Name
Function
Master Out
Slave In
Master In
Slave Out
Serial Clock
Slave Select
(active low)
Description
MOSI
Master data output.
MISO
Slave data output.
SCLK
SS_
Clock generated by the Master.
This signal is provided to enable multi-slave
connections to the MISO pin. The MOSI and
SCLK pins can be connected to multiple
slaves, and the SS_ input selects which slave
will receive the input data and drive the MISO
line.