| 전자부품 데이터시트 검색엔진 |
|
PIC16F15213T-I/ST 데이터시트(PDF) 149 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F15213T-I/ST 데이터시트(HTML) 149 Page - Microchip Technology |
|
149 / 439 page ![]() 18.4 Bidirectional Pins PPS selections for peripherals with bidirectional signals on a single pin must be made so that the PPS input and PPS output select the same pin. The I2C Serial Clock (SCL) and Serial Data (SDA) are examples of such pins. Important: The I2C default pins and a limited number of other alternate pins are I2C and SMBus compatible. SDA and SCL signals can be routed to any pin; however, pins without I2C compatibility will operate at standard TTL/ST logic levels as selected by the port’s INLVL register. 18.5 PPS Lock The PPS module provides an extra layer of protection to prevent inadvertent changes to the PPS selection registers. The PPSLOCKED bit is used in combination with specific code execution blocks to lock/unlock the PPS selection registers. Important: The PPSLOCKED bit is clear by default (PPSLOCKED = 0), which allows the PPS selection registers to be modified without an unlock sequence. PPS selection registers are locked when the PPSLOCKED bit is set (PPSLOCKED = 1). Setting the PPSLOCKED bit requires a specific lock sequence as shown in the examples below in both C and assembly languages. PPS selection registers are unlocked when the PPSLOCKED bit is clear (PPSLOCKED = 0). Clearing the PPSLOCKED bit requires a specific unlock sequence as shown in the examples below in both C and assembly languages. Important: All interrupts must be disabled before starting the lock/unlock sequence to ensure proper execution. Example 18-1. PPS Lock Sequence (assembly language) ; suspend interrupts BCF INTCON0,GIE BANKSEL PPSLOCK ; required sequence, next 5 instructions MOVLW 0x55 MOVWF PPSLOCK MOVLW 0xAA MOVWF PPSLOCK ; Set PPSLOCKED bit BSF PPSLOCK,PPSLOCKED ; restore interrupts BSF INTCON0,GIE Example 18-2. PPS Lock Sequence (C language) INTCON0bits.GIE = 0; //Suspend interrupts PPSLOCK = 0x55; //Required sequence PPSLOCK = 0xAA; //Required sequence PPSLOCKbits.PPSLOCKED = 1; //Set PPSLOCKED bit INTCON0bits.GIE = 1; //Restore interrupts PIC16F15213/14/23/24/43/44 PPS - Peripheral Pin Select Module © 2020-2022 Microchip Technology Inc. and its subsidiaries Data Sheet DS40002195E-page 149 |
|
링크 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 |