| 数据搜索系统,热门电子元器件搜索 |
|
PIC18F258-E/SOSQTP 数据表(PDF) 104 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC18F258-E/SOSQTP 数据表(HTML) 104 Page - Microchip Technology |
|
104 / 402 page ![]() PIC18FXX8 DS41159E-page 102 © 2006 Microchip Technology Inc. 9.4 PORTD, TRISD and LATD Registers PORTD is an 8-bit wide, bidirectional port. The corre- sponding Data Direction register for the port is TRISD. Setting a TRISD bit (= 1) will make the corresponding PORTD pin an input (i.e., put the corresponding output driver in a high-impedance mode). Clearing a TRISD bit (= 0) will make the corresponding PORTD pin an output (i.e., put the contents of the output latch on the selected pin). Read-modify-write operations on the LATD register read and write the latched output value for PORTD. PORTD uses Schmitt Trigger input buffers. Each pin is individually configurable as an input or output. PORTD can be configured as an 8-bit wide, micro- processor port (Parallel Slave Port or PSP) by setting the control bit PSPMODE (TRISE<4>). In this mode, the input buffers are TTL. See Section 10.0 “Parallel Slave Port” for additional information. PORTD is also multiplexed with the analog comparator module and the ECCP module. EXAMPLE 9-4: INITIALIZING PORTD FIGURE 9-9: PORTD BLOCK DIAGRAM IN I/O PORT MODE Note: This port is only available on the PIC18F448 and PIC18F458. CLRF PORTD ; Initialize PORTD by ; clearing output ; data latches CLRF LATD ; Alternate method ; to clear output ; data latches MOVLW 07h ; comparator off MOVWF CMCON MOVLW 0CFh ; Value used to ; initialize data ; direction MOVWF TRISD ; Set RD3:RD0 as inputs ; RD5:RD4 as outputs ; RD7:RD6 as inputs PORT/PSP Select Data Bus WR LATD WR TRISD Data Latch TRIS Latch RD TRISD Q D Q CK QD EN Q D Q CK P N VDD Vss RD PORTD RD0/PSP0/ or PORTD RD LATD Schmitt Trigger Note 1: I/O pins have diode protection to VDD and VSS. PSP Data Out PSP Write PSP Read C1IN+ C1IN+ pin(1) |
|
链接网址 |
| 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 |