| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
PIC16F15213T-I/ST bảng dữ liệu(PDF) 286 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F15213T-I/ST bảng dữ liệu(HTML) 286 Page - Microchip Technology |
|
286 / 439 page ![]() 25.2.4 I2C Host Mode Host mode is enabled by configuring the appropriate SSPM bits and setting the SSPEN bit. In Host mode, the SDA and SCL pins must be configured as inputs. The MSSP peripheral hardware will override the output driver TRIS controls when necessary to drive the pins low. Host mode of operation is supported by interrupt generation on the detection of the Start and Stop conditions. The Stop (P) and Start (S) bits are cleared from a Reset or when the MSSP module is disabled. Control of the I2C bus may be taken when the P bit is set, or the bus is Idle. In Firmware Controlled Host mode, user code conducts all I2C bus operations based on Start and Stop condition detection. Start and Stop condition detection is the only active circuitry in this mode. All other communication is done by the user software directly manipulating the SDA and SCL lines. The following events will cause the MSSP Interrupt Flag (SSPxIF) bit to be set (MSSP interrupt, if enabled): • Start condition detected • Stop condition detected • Data transfer byte transmitted/received • Acknowledge transmitted/received • Repeated Start generated Important: 1. The MSSP module, when configured in I2C Host mode, does not allow queuing of events. For instance, the user is not allowed to initiate a Start condition and immediately write the SSPxBUF register to initiate transmission before the Start condition is complete. In this case, SSPxBUF will not be written to and the Write Collision Detect (WCOL) bit will be set, indicating that a write to SSPxBUF did not occur. 2. Host mode suspends Start/Stop detection when sending the Start/Stop condition by means of the SEN/PEN control bits. The SSPxIF bit is set at the end of the Start/Stop generation when hardware clears the control bit. 25.2.4.1 I2C Host Mode Operation The host device generates all of the serial clock pulses and the Start and Stop conditions. A transfer is ended with a Stop condition or with a Repeated Start condition. Since the Repeated Start condition is also the beginning of the next serial transfer, the I2C bus will not be released. In Host Transmitter mode, serial data is output through SDA, while SCL outputs the serial clock. The first byte transmitted contains the client address of the receiving device (seven bits) and the R/W bit. In this case, the R/W bit will be logic ‘0’. Serial data is transmitted eight bits at a time. After each byte is transmitted, an Acknowledge bit is received. Start and Stop conditions are output to indicate the beginning and the end of a serial transfer. In Host Receive mode, the first byte transmitted contains the client address of the transmitting device (seven bits) and the R/W bit. In this case, the R/W bit will be logic ‘1’. Thus, the first byte transmitted is a 7-bit client address followed by a ‘1’ to indicate the receive bit. Serial data is received via SDA, while SCL outputs the serial clock. Serial data is received eight bits at a time. After each byte is received, an Acknowledge sequence is transmitted. Start and Stop conditions indicate the beginning and end of transmission. A Baud Rate Generator is used to set the clock frequency output on SCL. See 25.3. Baud Rate Generator for more details. 25.2.4.1.1 Clock Arbitration Clock arbitration occurs when the host, during any receive, transmit or Repeated Start/Stop condition, releases the SCL pin (SCL allowed to float high). When the SCL pin is allowed to float high, the Baud Rate Generator (BRG) is suspended from counting until the SCL pin is actually sampled high. When the SCL pin is sampled high, the Baud Rate Generator is reloaded with the contents of SSPxADD and begins counting. This ensures that the SCL high time will always be at least one BRG rollover count in the event that the clock is held low by an external device as shown in Figure 25-24. PIC16F15213/14/23/24/43/44 MSSP - Host Synchronous Serial Port Module © 2020-2022 Microchip Technology Inc. and its subsidiaries Data Sheet DS40002195E-page 286 |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |