The SPI operates in Ma" />
參數(shù)資料
型號: ATWEBDVK-02WC
廠商: Atmel
文件頁數(shù): 101/137頁
文件大?。?/td> 0K
描述: KIT DEV TCP/IP AT89C51RD2 WEBCAM
標準包裝: 1
系列: @Web
主要目的: *
嵌入式: *
已用 IC / 零件: AT89C51RD2
主要屬性: *
次要屬性: *
已供物品: 板,帶網(wǎng)絡 Webcam 模塊和軟件
產(chǎn)品目錄頁面: 617 (CN2011-ZH PDF)
66
4235K–8051–05/08
AT89C51RD2/ED2
Figure 16-3. Full-Duplex Master-Slave Interconnection
16.3.1.1
Master Mode
The SPI operates in Master mode when the Master bit, MSTR (1), in the SPCON register is set.
Only one Master SPI device can initiate transmissions. Software begins the transmission from a
Master SPI Module by writing to the Serial Peripheral Data Register (SPDAT). If the shift register
is empty, the Byte is immediately transferred to the shift register. The Byte begins shifting out on
MOSI pin under the control of the serial clock, SCK. Simultaneously, another Byte shifts in from
the Slave on the Master’s MISO pin. The transmission ends when the Serial Peripheral transfer
data flag, SPIF, in SPSTA becomes set. At the same time that SPIF becomes set, the received
Byte from the Slave is transferred to the receive data register in SPDAT. Software clears SPIF
by reading the Serial Peripheral Status register (SPSTA) with the SPIF bit set, and then reading
the SPDAT.
16.3.1.2
Slave Mode
The SPI operates in Slave mode when the Master bit, MSTR (2), in the SPCON register is
cleared. Before a data transmission occurs, the Slave Select pin, SS, of the Slave device must
be set to ’0’. SS must remain low until the transmission is complete.
In a Slave SPI Module, data enters the shift register under the control of the SCK from the Mas-
ter SPI Module. After a Byte enters the shift register, it is immediately transferred to the receive
data register in SPDAT, and the SPIF bit is set. To prevent an overflow condition, Slave software
must then read the SPDAT before another Byte enters the shift register (3). A Slave SPI must
complete the write to the SPDAT (shift register) at least one bus cycle before the Master SPI
starts a transmission. If the write to the data register is late, the SPI transmits the data already in
the shift register from the previous transmission. The maximum SCK frequency allowed in slave
mode is F
CLK PERIPH /4.
16.3.2
Transmission Formats
Software can select any of four combinations of serial clock (SCK) phase and polarity using two
bits in the SPCON: the Clock Polarity (CPOL (4)) and the Clock Phase (CPHA4). CPOL defines
the default SCK line level in idle state. It has no significant effect on the transmission format.
CPHA defines the edges on which the input data are sampled and the edges on which the out-
put data are shifted (Figure 16-4 and Figure 16-5). The clock phase and polarity should be
identical for the Master SPI device and the communicating Slave device.
8-bit Shift register
SPI
Clock Generator
Master MCU
8-bit Shift register
MISO
MOSI
SCK
VSS
VDD
SS
Slave MCU
1.
The SPI Module should be configured as a Master before it is enabled (SPEN set). Also, the Mas-
ter SPI should be configured before the Slave SPI.
2.
The SPI Module should be configured as a Slave before it is enabled (SPEN set).
3.
The maximum frequency of the SCK for an SPI configured as a Slave is the bus clock speed.
4.
Before writing to the CPOL and CPHA bits, the SPI should be disabled (SPEN = ’0’).
相關PDF資料
PDF描述
VRE210MA IC VREF SERIES PREC 10V 20-CLCC
VRE204M IC VREF SERIES PREC 4.5V 20-CLCC
ATWEBDVK-02VOIP KIT DEV TCP/IP AT89C51RD2 VOIP
A3DDB-1018G IDC CABLE- AKR10B/AE10G/AKR10B
V24C12E150BL3 CONVERTER MOD DC/DC 12V 150W
相關代理商/技術參數(shù)
參數(shù)描述
ATWEBEVK-01 功能描述:KIT EVAL TCP/IP AT89C51AC2 RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 評估演示板和套件 系列:@Web 產(chǎn)品培訓模塊:Obsolescence Mitigation Program 標準包裝:1 系列:- 主要目的:電源管理,電池充電器 嵌入式:否 已用 IC / 零件:MAX8903A 主要屬性:1 芯鋰離子電池 次要屬性:狀態(tài) LED 已供物品:板
ATWEBEVK-02 功能描述:KIT SOFTWARE EVAL FOR T89C51CC01 制造商:microchip technology 系列:- 零件狀態(tài):停產(chǎn) 主要用途:接口,以太網(wǎng) 嵌入式:- 使用的 IC/零件:- 主要屬性:- 輔助屬性:- 所含物品:板 標準包裝:1
ATWEBEVK-05 功能描述:KIT EVAL MODULE RS232 TO TCP/IP RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 評估演示板和套件 系列:@Web 產(chǎn)品培訓模塊:Obsolescence Mitigation Program 標準包裝:1 系列:- 主要目的:電源管理,電池充電器 嵌入式:否 已用 IC / 零件:MAX8903A 主要屬性:1 芯鋰離子電池 次要屬性:狀態(tài) LED 已供物品:板
ATWEBEVK-06 功能描述:BOARD EVAL FOR CAN-ETHERNET MOD RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 評估演示板和套件 系列:@Web 產(chǎn)品培訓模塊:Obsolescence Mitigation Program 標準包裝:1 系列:- 主要目的:電源管理,電池充電器 嵌入式:否 已用 IC / 零件:MAX8903A 主要屬性:1 芯鋰離子電池 次要屬性:狀態(tài) LED 已供物品:板
ATWEBSEG-32 功能描述:MODULE RS232 TO TCP/IP RoHS:否 類別:編程器,開發(fā)系統(tǒng) >> 過時/停產(chǎn)零件編號 系列:- 標準包裝:1 系列:- 類型:MCU 適用于相關產(chǎn)品:Freescale MC68HC908LJ/LK(80-QFP ZIF 插口) 所含物品:面板、纜線、軟件、數(shù)據(jù)表和用戶手冊 其它名稱:520-1035