| 전자부품 데이터시트 검색엔진 |
|
TUSB5052 데이터시트(PDF) 65 Page - Texas Instruments |
|
|
|||||||||||||||||||||||||||||
TUSB5052 데이터시트(HTML) 65 Page - Texas Instruments |
|
65 / 84 page ![]() 8–5 8.1.7 PPDAT: P-Port Data Register This register is used for data I/O for all modes. When in the output direction (DIR = 0), writing to this register places the data into PD[7:0]. When in the input direction (DIR =1), this register contains the byte entered by the peripheral (see Figure 8–1). D7 D6 D5 D4 D3 D2 D1 D0 7 6 5 4 32 10 R/W R/W R/W R/W R/W R/W R/W R/W BIT NAME RESET FUNCTION 7–0 D[7:0] 00h P-Port data output and input 8.2 Mode-1 (SPP): Bidirectional Centronics Mode This mode supports data transfer in the output and input directions. The PPMCR[DIR]-bit controls the transceiver direction (when DIR = 0, the port is an output; when DIR = 1, the port is an input). In this mode, all handshake signals are generated automatically without the need for the MCU to toggle bits. The following describes the output and input sequences: 8.2.1 MCU Output Sequence 1. MCU writes M[2:0] = 001b to PPMCR to set the port to mode-1, and sets PPMCR[DIR] = 0. 2. MCU sets PPIMSK[ETxE] = 1. This enables the TxE interrupt. 3. MCU reads a byte from buffer (in SRAM) 4. MCU writes the byte to PPDAT register. This clears PPMCR[TxE] to 0. 5. Writing to PPDAT starts the transfer. 6. When the byte is transferred, PPMCR[TxE] is set to 1. This interrupts the MCU, indicating that the port is ready for the next byte. 7. Steps 3 to 6 are repeated until the SRAM buffer is empty. 8. MCU sets PPIMSK[ETxE] = 0. This disables the TxE interrupt. 8.2.2 MCU Input Sequence 1. MCU writes M[2:0] = 001b to PPMCR to set the port to mode-1, and sets PPMCR[DIR] = 1. 2. MCU sets PPIMSK[ERxF] = 1. This enables the RxF interrupt. 3. When a byte is received, PPMCR[RxF] is set to 1. This interrupts the MCU, indicating that the port contains a byte. 4. MCU reads a byte from PPDAT register. This clears PPMCR[RxF] to 0. 5. MCU writes the byte to buffer (in SRAM). 6. Steps 3 to 6 are repeated until the buffer (in SRAM) is full. 7. MCU sets PPIMSK[ERxF] = 0. This disables the RxF interrupt. 8.2.3 DMA Input Sequence 1. MCU writes M[2:0] = 001b to PPMCR to set the port to mode-1. 2. MCU sets PPIMSK[ERxF] = 0. (no RxF interrupt). 3. MCU sets the proper DMA for input data transfer. 4. DMA reads a byte from the PPDAT register (RxF is used for DMA handshake). 5. DMA writes the byte to buffer (in SRAM). 6. Steps 4 and 5 are repeated without MCU involvement until the full buffer is received or until an error condition is detected. 7. When the full buffer is received, the DMA switches to X/Y-buffer. 8. Steps 4 to 7 continue until terminated by time-out or by the MCU. 9. When terminated, the MCU tests the DMASTA register. |
|
링크 URL |
| 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 |