| 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) 239 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F15213T-I/ST bảng dữ liệu(HTML) 239 Page - Microchip Technology |
|
239 / 439 page ![]() 24.4.2 Synchronous Client Mode The following bits are used to configure the EUSART for synchronous client operation: • SYNC = 1 (configures the EUSART for synchronous operation) • CSRC = 0 (configures the EUSART as a client) • SREN = 0 (for transmit); SREN = 1 (for single byte receive) • CREN = 0 (for transmit); CREN = 1 (recommended setting for continuous receive) • SPEN = 1 (enables the EUSART) Important: Clearing the SREN and CREN bits ensure that the device is in Transmit mode, otherwise the device will be configured to receive. 24.4.2.1 EUSART Synchronous Client Transmit The operation of the Synchronous Host and Client modes are identical (see 24.4.1.3. Synchronous Host Transmission), except in the case of the Sleep mode. If two words are written to the TXxREG and then the SLEEP instruction is executed, the following will occur: 1. The first character will immediately transfer to the TSR register and transmit. 2. The second word will remain in the TXxREG register. 3. The TXxIF bit will not be set. 4. After the first character has been shifted out of TSR, the TXxREG register will transfer the second character to the TSR and the TXxIF bit will now be set. 5. If the PEIE and TXxIE bits are set, the interrupt will wake the device from Sleep and execute the next instruction. If the GIE bit is also set, the program will call the Interrupt Service Routine. 24.4.2.2 Synchronous Client Transmission Setup 1. Set the SYNC and SPEN bits and clear the CSRC bit. 2. Select the transmit output pin by writing the appropriate values to the RxyPPS register and RXxPPS register. Both selections may enable the same pin. 3. Select the clock input pin by writing the appropriate value to the TXxPPS register. 4. Clear the ANSEL bit for the CKx pin (if applicable). 5. Clear the CREN and SREN bits. 6. If interrupts are desired, set the TXxIE bit of the PIEx register and the GIE and PEIE bits of the INTCON register. 7. If 9-bit transmission is desired, set the TX9 bit. 8. Enable transmission by setting the TXEN bit. 9. If 9-bit transmission is selected, insert the Most Significant bit into the TX9D bit. 10. Prepare for transmission by writing the eight Least Significant bits to the TXxREG register. The word will be transmitted in response to the Host clocks at the CKx pin. 24.4.2.3 EUSART Synchronous Client Reception The operation of the Synchronous Host and Client modes is identical (see 24.4.1.5. Synchronous Host Reception), with the following exceptions: • Sleep • CREN bit is always set, therefore the receiver is never Idle • SREN bit, which is a “don’t care” in Client mode A character may be received while in Sleep mode by setting the CREN bit prior to entering Sleep. Once the word is received, the RSR register will transfer the data to the RCxREG register. If the RCxIE enable bit is set, the interrupt generated will wake the device from Sleep and execute the next instruction. If the GIE bit is also set, the program will branch to the interrupt vector. PIC16F15213/14/23/24/43/44 EUSART - Enhanced Universal Synchronous Asyn... © 2020-2022 Microchip Technology Inc. and its subsidiaries Data Sheet DS40002195E-page 239 |
|
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 |