| 数据搜索系统,热门电子元器件搜索 |
|
AT83C5111 数据表(PDF) 37 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
AT83C5111 数据表(HTML) 37 Page - ATMEL Corporation |
|
37 / 86 page ![]() 37 AT8xC5111 4190A–8051–11/02 Figure 3. Full-Duplex Master-slave Interconnection Master Mode The SPI operates in Master mode. Only one Master SPI device can initiate transmis- sions. 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 imme- diately 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. When the pin SS is pulled down during a transmission, the data is interrupted and when the transmission is established again, the data present in the SPDAT is present. 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 (1)) and the Clock PHAse (CPHA(1)). 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 output data are shifted (Figure 15 and Figure 16). The clock phase and polarity should be identical for the Master SPI device and the com- municating Slave device. Figure 4. Data Transmission Format (CPHA = 0) 8-bit Shift register SPI Clock Generator Master MCU 8-bit Shift register MISO MISO MOSI MOSI SCK SCK VSS VDD SS SS Slave MCU 1. Before writing to the CPOL and CPHA bits, the SPI should be disabled (SPEN = ’0’). MSB bit6 bit5 bit4 bit3 bit2 bit1 LSB bit6 bit5 bit4 bit3 bit2 bit1 MSB LSB 13 24 5 6 7 8 Capture Point SS (to Slave) MISO (from Slave) MOSI (from Master) SCK (CPOL = 1) SCK (CPOL = 0) SPEN (Internal) SCK Cycle Number |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |