| Electronic Components Datasheet Search |
|
PIC18LC658T-E/CL Datasheet(PDF) 101 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC18LC658T-E/CL Datasheet(HTML) 101 Page - Microchip Technology |
|
101 / 366 page ![]() 2000 Microchip Technology Inc. Advanced Information DS30475A-page 101 PIC18CXX8 8.7 PORTG, LATG, and TRISG Registers PORTG is a 5-bit wide, bi-directional port. The corre- sponding Data Direction register is TRISG. Setting a TRISG bit (=1) will make the corresponding PORTG pin an input (i.e., put the corresponding output driver in a hi-impedance mode). Clearing a TRISG bit (=0) will make the corresponding PORTG pin an output (i.e., put the contents of the output latch on the selected pin). Read-modify-write operations on the LATG register read and write the latched output value for PORTG. Pins RG0-RG2 on PORTG are multiplexed with the CAN peripheral. Refer to "CAN Module", Section 17.0 for proper settings of TRISG when CAN is enabled. EXAMPLE 8-7: INITIALIZING PORTG FIGURE 8-12: RG0/CANTX0 PIN BLOCK DIAGRAM CLRF PORTG ; Initialize PORTG by ; clearing output ; data latches CLRF LATG ; Alternate method ; to clear output ; data latches MOVLW 0x04 ; Value used to ; initialize data ; direction MOVWF TRISG ; Set RG1:RG0 as outputs ; RG2 as input ; RG4:RG3 as outputs Data Latch TRIS Latch RD TRISG P VSS Q D Q CK Q D Q CK EN QD EN N VDD 0 1 RD PORTG WR TRISG Data Bus I/O Pin TXD ENDRHI OPMODE2:OPMODE0=000 Schmitt Trigger RD LATG WR PORTG or WR LATG OPMODE2:OPMODE0 = 000 Note: I/O pins have diode protection to VDD and VSS. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |