| поискавой системы для электроныых деталей |
|
MSC1202Y2RHHT датащи(PDF) 31 Page - Texas Instruments |
|
|
|
|||||||||||||||||||||||||||||
MSC1202Y2RHHT датащи(HTML) 31 Page - Texas Instruments |
|
31 / 92 page ![]() MSC1200 MSC1201 MSC1202 SBAS317E − APRIL 2004 − REVISED MAY 2006 www.ti.com 31 1) SS Asserted 2) First SCK Edge 3) CNTIF Set (dependent on CPHA bit) 4) SS Negated SCK Cycle # MSB 6 54 321 LSB MSB 654 3 2 1 LSB SlaveCPHA = 0Transfer inProgress 2 4 3 1 123 4 5 6 7 8 SlaveCPHA = 1Transfer inProgress Sample Input (CPHA = 0) Data Out (CPHA = 1) Data Out Sample Input SS to Slave SCK (CPOL = 0) SCK (CPOL = 1) Figure 18. SPI Timing Diagram The SS pin can be used to control the output of data on DOUT when the MSC120x is in slave mode. The SS function is enabled or disabled by the ESS bit of the SPICON SFR. When enabled, the SS input of a slave device must be externally asserted before a master device can exchange data with the slave device. SS must be low before data transactions and must stay low for the duration of the transaction. When SS is high, data will not be shifted into the shift register, nor will the counter increment. When SPI is enabled, SS also controls the drive of the line DOUT (P1.2). When SS is low in slave mode, the DOUT pin will be driven and when SS is high, DOUT will be high impedance. The SPI generates interrupt ECNT (AIE.2) to indicate that the transfer/reception of the byte is complete. The interrupt goes high whenever the counter value is equal to 8 (indicating that eight SCKs have occurred). The interrupt is cleared on reading or writing to the SPIDATA register. During the data transfer, the actual counter value can be read from the SPICON SFR. Power Down The SPI is powered down by the PDSPI bit in the power control register (PDCON). This bit needs to be cleared to enable the SPI function. When the SPI is powered down, pins P1.2, P1.3, P1.4, and P3.6 revert to general-purpose I/O pins. Application Flow This section explains the typical application usage flow of SPI in master and slave modes. Master Mode Application Flow 1. Configure the port pins. 2. Configure the SPI. 3. Assert SS to enable slave communication (if applicable). 4. Write data to SPIDATA. 5. Generate eight SCKs. 6. Read the received data from SPIDATA. Slave Mode Application Flow 1. Configure the ports pins. 2. Enable SS (if applicable). 3. Configure the SPI. 4. Write data to SPIDATA. 5. Wait for the Count Interrupt (eight SCKs). 6. Read the data from SPIDATA. CAUTION: If SPIDATA is not read before the next SPI transaction, the ECNT interrupt will be removed and the previous data will be lost. |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |