| 数据搜索系统,热门电子元器件搜索 |
|
PIC16F72/ML 数据表(PDF) 27 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F72/ML 数据表(HTML) 27 Page - Microchip Technology |
|
27 / 136 page ![]() 2002 Microchip Technology Inc. DS39597B-page 25 PIC16F72 3.3 PORTC and the TRISC Register PORTC is an 8-bit wide, bi-directional port. The corre- sponding data direction register is TRISC. Setting a TRISC bit (= 1) will make the corresponding PORTC pin an input (i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a TRISC bit (= 0) will make the corresponding PORTC pin an output (i.e., put the contents of the output latch on the selected pin). PORTC is multiplexed with several peripheral functions (Table 3-5). PORTC pins have Schmitt Trigger input buffers. When enabling peripheral functions, care should be taken in defining TRIS bits for each PORTC pin. Some peripherals override the TRIS bit to make a pin an out- put, while other peripherals override the TRIS bit to make a pin an input. Since the TRIS bit override is in effect while the peripheral is enabled, read-modify- write instructions (BSF, BCF, XORWF) with TRISC as destination should be avoided. The user should refer to the corresponding peripheral section for the correct TRIS bit settings. EXAMPLE 3-3: INITIALIZING PORTC FIGURE 3-5: PORTC BLOCK DIAGRAM (PERIPHERAL OUTPUT OVERRIDE) BANKSEL PORTC ; Select Bank for PORTC CLRF PORTC ; Initialize PORTC by ; clearing output ; data latches BANKSEL TRISC ; Select Bank for TRISC MOVLW 0xCF ; Value used to ; initialize data ; direction MOVWF TRISC ; Set RC<3:0> as inputs ; RC<5:4> as outputs ; RC<7:6> as inputs Port/Peripheral Select(1) Data WR Port WR TRIS RD Data Latch TRIS Latch RD TRIS Schmitt Trigger Q D Q CK QD EN Peripheral Data Out 0 1 Q D Q CK P N VDD VSS Port Peripheral OE(2) Peripheral Input Note 1: Port/Peripheral select signal selects between port data and peripheral output. 2: Peripheral OE (output enable) is only activated if peripheral select is active. VSS I/O pin VDD Bus |
|
链接网址 |
| 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 |