| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
PIC18F4331 bảng dữ liệu(PDF) 126 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC18F4331 bảng dữ liệu(HTML) 126 Page - Microchip Technology |
|
126 / 396 page ![]() PIC18F2331/2431/4331/4431 DS39616B-page 124 Preliminary 2003 Microchip Technology Inc. 10.4 PORTD, TRISD and LATD Registers PORTD is an 8-bit wide, bidirectional port. The corresponding Data Direction register 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). The Data Latch register (LATD) is also memory mapped. Read-modify-write operations on the LATD register read and write the latched output value for PORTD. All pins on PORTD are implemented with Schmitt Trigger input buffers. Each pin is individually configurable as an input or output. PORTD includes PWM<7:6> complementary fourth channel PWM outputs. PWM4 is the complementary output of PWM5 (the third channel), which is multi- plexed with the RB5 pin. This output can be used as the alternate output using the PWM4MX configuration bit in CONFIG3L when the low-voltage programming pin (PGM) is used on RB5. RD1, RD2 and RD3 can be used as the alternate out- put for SDO, SDI/SDA and SCK/SCL using the SSPMX configuration bit in CONFIG3L. RD4 an be used as the alternate output for FLTA using the FLTAMX configuration bit in CONFIG3L. EXAMPLE 10-4: INITIALIZING PORTD FIGURE 10-21: BLOCK DIAGRAM OF RD7:RD6 PINS Note: PORTD is only available on PIC18F4X31 devices. Note: On a Power-on Reset, these pins are configured as digital inputs. CLRF PORTD ; Initialize PORTD by ; clearing output ; data latches CLRF LATD ; Alternate method ; to clear output ; data latches MOVLW 0xCF ; Value used to ; initialize data ; direction MOVWF TRISD ; Set RD<3:0> as inputs ; RD<5:4> as outputs ; RD<7:6> as inputs 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 RD[7:6] Pin or PORTD RD LATD Schmitt Trigger PORT/PWM Select 0 1 PWM6,7 Data Out |
|
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 |