| Electronic Components Datasheet Search |
|
PIC17C752 Datasheet(PDF) 84 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC17C752 Datasheet(HTML) 84 Page - Microchip Technology |
|
84 / 306 page ![]() PIC17C7XX DS30289C-page 84 1998-2013 Microchip Technology Inc. 10.6 PORTF and DDRF Registers PORTF is an 8-bit wide bi-directional port. The corre- sponding data direction register is DDRF. A '1' in DDRF configures the corresponding port pin as an input. A '0' in the DDRF register configures the corresponding port pin as an output. Reading PORTF reads the status of the pins, whereas writing to PORTF will write to the respective port latch. All eight bits of PORTF are multiplexed with 8 channels of the 10-bit A/D converter. Upon RESET, the entire Port is automatically config- ured as analog inputs and must be configured in soft- ware to be a digital I/O. Example 10-6 shows an instruction sequence to initial- ize PORTF. The Bank Select Register (BSR) must be selected to Bank 5 for the port to be initialized. The fol- lowing example uses the MOVLB instruction to load the BSR register for bank selection. EXAMPLE 10-6: INITIALIZING PORTF FIGURE 10-13: BLOCK DIAGRAM OF RF7:RF0 MOVLB 5 ; Select Bank 5 MOVWF 0x0E ; Configure PORTF as MOVWF ADCON1 ; Digital CLRF PORTF, F ; Initialize PORTF data ; latches before ; the data direction ; register MOVLW 0x03 ; Value used to init ; data direction MOVWF DDRF ; Set RF<1:0> as inputs ; RF<7:2> as outputs Data Bus WR PORTF WR DDRF RD PORTF Data Latch DDRF Latch P VSS I/O pin PCFG3:PCFG0 Q D Q CK Q D Q CK EN QD EN N ST Input Buffer VDD RD DDRF To other pads VAIN CHS3:CHS0 To other pads Note: I/O pins have protection diodes 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 |