| Electronic Components Datasheet Search |
|
STC12LE5616AD Datasheet(PDF) 272 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC12LE5616AD Datasheet(HTML) 272 Page - STCmicro Technology Co,.Ltd |
|
272 / 377 page ![]() Chapter 11. Serial Peripheral Interface (SPI) STC12C5620AD provides another high-speed serial communication interface, the SPI interface. SPI is a full-duplex, high-speed, synchronous communication bus with two operation modes: Master mode and Slave mode. Up to 3Mbit/s can be supported in either Master or Slave mode under the SYSclk=12MHz. Two status flags are provided to signal the transfer completion and write-collision occurrence. 1. SPI Control register: SPCTL (Non bit-addressable) SFR name Address bit B7 B6 B5 B4 B3 B2 B1 B0 SPCTL 85H name SSIG SPEN DORD MSTR CPOL CPHA SPR1 SPR0 SSIG : Control whether SS pin is ignored or not. If SSIG=1, MSTR(SPCTL.4) decides whether the device is a master or slave. If SSIG=0, the SS pin decides whether the device is a master or slave. SS pin can be used as I/O port. SPEN : SPI enable bit. If SPEN=0, the SPI interface is disabled and all SPI pins will be general-purpose I/O ports. If SPEN=1, the SPI is enabled. DORD : Set the transmitted or received SPI data order. If DORD=1, The LSB of the data word is transmitted first. If DORD=0, The MSB of the data word is transmitted first. MSTR : Master/Slave mode select bit. If MSTR=0, set the SPI to play as Slave part. If MSTR=1, set the SPI to play as Master part. CPOL : SPI clock polarity select bit. If CPOL=1, SPICLK is high level when in idle mode. The leading edge of SPICLK is the falling edge and the trailing edge is the rising edge. If CPOL=0, SPICLK is low when idle. The leading edge of SPICLK is the rising edge and the trailing edge is the falling edge. CPHA : SPI clock phase select bit. If CPHA=1, Data is driven on the leading edge of SPICLK, and is sampled on the trailing edge. If CPHA=0, Data is driven when SS pin is low (SSIG=0) and changes on the trailing edge of SPICLK. Data is sampled on the leading edge of SPICLK. (Note : If SSIG=1, CPHA must not be 0, otherwise the operation is undefined) 11.1 Special Function Registers related with SPI Mnemonic Description Address Bit address and Symbol Reset Value B7 B6 B5 B4 B3 B2 B1 B0 SPCTL SPI Control Register 85H SSIG SPEN DORD MSTR CPOL CPHA SPR1 SPR0 0000,0100 SPSTAT SPI Status Register 84H SPIF WCOL - - - - - - 00xx,xxxx SPDAT SPI Data Register 86H 0000,0000 SPI Management SFRs 272 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |