Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

PIC14000T-04/SS View Datasheet(PDF) - Microchip Technology

Part Name
Description
MFG CO.
PIC14000T-04/SS
Microchip
Microchip Technology Microchip
'PIC14000T-04/SS' PDF : 153 Pages View PDF
5.0 I/O PORTS
The PIC14000 has three ports, PORTA, PORTC and
PORTD, described in the following paragraphs.
Generally, PORTA is used as the analog input port.
PORTC is used for general purpose I/O and for host
communication. PORTD provides additional I/O lines.
Four lines of PORTD may function as analog inputs.
5.1 PORTA and TRISA
PORTA is a 4-bit wide port with data register located at
location 05h and corresponding data direction register
(TRISA) at 85h. PORTA can operate as either
analog inputs for the internal A/D converter or as
general purpose digital I/O ports. These inputs are
Schmitt Triggers when used as digital inputs, and have
CMOS drivers as outputs.
PORTA pins are multiplexed with analog inputs.
ADCON1<1:0> bits control whether these pins are
analog or digital as shown in Section 8.7. When config-
ured to the digital mode, reading the PORTA register
reads the status of the pins whereas writing to it will
write to the port latch. When selected as an analog
input, these pins will read as ‘0’s.
PIC14000
Note: On Reset, PORTA is configured as analog
inputs
The TRISA register controls the direction of the PORTA
pins, even when they are being used as analog inputs.
The user must make sure to keep the pins configured
as inputs when using them as analog inputs. A ‘1’ in
each location configures the corresponding port pin as
an input. This register resets to all ‘1’s, meaning all
PORTA pins are initially inputs. The data register
should be initialized prior to configuring the port as out-
puts. See Figure 5-2 and Figure 5-3.
PORTA inputs go through a Schmitt Trigger AND gate
that is disabled when the input is in analog mode. Refer
to Figure 5-1.
Note that bits RA<7:4> are unimplemented and always
read as ‘0’. Unused inputs should not be left floating to
avoid leakage currents. All pins have input protection
diodes to VDD and VSS.
EXAMPLE 5-1: INITIALIZING PORTA
CLRF PORTA
;Initialize PORTA by setting
;output data latches
BSF STATUS, RP0 ;Select Bank1
MOVLW 0x0F
;Value used to initialize
;data direction
MOVWF TRISA
;Set RA<3:0> as inputs
FIGURE 5-1: PORTA BLOCK DIAGRAM
Data
Bus
Write
PORTA
DQ
CK Q
VDD
P
I/O
Pin
Write
TRISA
DQ
CK Q
Read
TRISA
N
VSS
Analog Input Mode
Schmitt Trigger
Input Buffer
Read
PORTA
QD
EN
To A/D Converter
Note: I/O pins have protection diodes to VDD and VSS.
© 1996 Microchip Technology Inc.
Preliminary
This document was created with FrameMaker 4 0 4
DS40122B-page 25
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]