参数资料
型号: ST72622L2T1
厂商: STMICROELECTRONICS
元件分类: 微控制器/微处理器
英文描述: 8-BIT, MROM, 8 MHz, MICROCONTROLLER, PQFP44
封装: TQFP-44
文件页数: 87/134页
文件大小: 815K
代理商: ST72622L2T1
ST7262
56/134
SERIAL PERIPHERAL INTERFACE (Cont’d)
10.4.4 Functional Description
Figure 1 shows the serial peripheral interface
(SPI) block diagram.
This interface contains 3 dedicated registers:
– A Control Register (SPICR)
– A Control Status Register (SPICSR)
– A Data Register (SPIDR)
Refer to the SPICR, SPICSR and SPIDR registers
in Section 0.1.5for the bit definitions.
10.4.4.1 SS Signal in Hardware/Software Mode
The SS signal can be obtained in two modes:
– Hardware mode (through the SS pin)
– Software mode (through the SSI bit in the SPIC-
SR register)
The mode (hardware or software) is selected by
the Slave Selection Mode (SSM) bit in the SPICSR
register.
Note: In this document, wherever SS signal selec-
tion is done using the SS pin (hardware mode),
this can also be done in software mode, using the
SSM and SSI bits.
10.4.4.2 Master Configuration
In a master configuration, the serial clock is gener-
ated on the SCK pin.
Procedure
1. Select the SPR[2:0] bits to define the serial
clock baud rate (see SPICR register).
2. Select the CPOL and CPHA bits to define
one of the four relationships between the
data transfer and the serial clock (see Figure
4).
3. Connect the SS pin to a high level signal dur-
ing the complete byte transmit sequence or,
in software mode, set the SSI bit in the
SPICSR register.
4. The MSTR and SPE bits must be set (they
remain set only if the SS pin is connected to
a high level signal).
In this configuration the MOSI pin is a data output
and to the MISO pin is a data input.
Transmit Sequence
The transmit sequence begins when a byte is writ-
ten in the DR register.
The data byte is parallel loaded into the 8-bit shift
register (from the internal bus) during a write cycle
and then shifted out serially to the MOSI pin most
significant bit first.
When data transfer is complete:
– The SPIF bit is set by hardware
– An interrupt is generated if the SPIE bit is set
and the I bit in the CCR register is cleared.
During the last clock cycle the SPIF bit is set, a
copy of the data byte received in the shift register
is moved to a buffer. When the SPIDR register is
read, the SPI peripheral returns this buffered val-
ue.
Clearing the SPIF bit is performed by the following
software sequence:
1. An access to the SPICSR register while the
SPIF bit is set
2. A read to the SPIDR register.
Note: While the SPIF bit is set, all writes to the
SPIDR register are inhibited until the SPICSR reg-
ister is read.
1
相关PDF资料
PDF描述
ST72621L4T1 8-BIT, MROM, 8 MHz, MICROCONTROLLER, PQFP44
ST72632K2B1/XXX 8-BIT, MROM, 8 MHz, MICROCONTROLLER, PDIP32
ST72E631K4D0 8-BIT, UVPROM, 8 MHz, MICROCONTROLLER, PDIP32
ST72633K1M1/XXX 8-BIT, MROM, 8 MHz, MICROCONTROLLER, PDSO34
ST7263BK1M1/XXX 8-BIT, MROM, 8 MHz, MICROCONTROLLER, PDSO34
相关代理商/技术参数
参数描述
ST7263-EMU2 功能描述:仿真器/模拟器 ST7 Emulator Board RoHS:否 制造商:Blackhawk 产品:System Trace Emulators 工具用于评估:C6000, C5000, C2000, OMAP, DAVINCI, SITARA, TMS470, TMS570, ARM 7/9, ARM Cortex A8/R4/M3 用于:XDS560v2
ST7265X-EVAL/MS 制造商:STMicroelectronics 功能描述:ST6 EVAL BD - Bulk
ST7265X-EVAL/PFD 制造商:STMicroelectronics 功能描述:USB FLASH EVAL - Bulk
ST7266 制造商:6940 功能描述:ST7266
ST7267C8T1L 制造商:STMicroelectronics 功能描述: